Merge pull request #51 from TouchInstinct/bug_fix
Fix switch to ui thread
This commit is contained in:
commit
bf1a1a1849
|
|
@ -159,7 +159,7 @@ public class BaseLifecycleBindable implements LifecycleBindable {
|
|||
@NonNull final Action1<Throwable> onErrorAction,
|
||||
@NonNull final Action0 onCompletedAction) {
|
||||
final Observable<T> actualObservable;
|
||||
if (onNextAction == Actions.empty() && onNextAction == Actions.empty() && onNextAction == Actions.empty()) {
|
||||
if (onNextAction == Actions.empty() && onErrorAction == (Action1) Actions.empty() && onCompletedAction == Actions.empty()) {
|
||||
actualObservable = observable.doOnCompleted(onCompletedAction);
|
||||
} else {
|
||||
actualObservable = observable.observeOn(AndroidSchedulers.mainThread()).doOnCompleted(onCompletedAction);
|
||||
|
|
|
|||
Loading…
Reference in New Issue