Skip to content

Commit eeaf75f

Browse files
author
Kaushik Gopal
committed
fix: subscriber's OnCompleted cannot seem to ber called from observable. OnCompleted made intenally from OnNext now
1 parent 8698d31 commit eeaf75f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/src/main/java/com/morihacky/android/rxjava/SubjectDebounceSearchEmitterFragment.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ public void onError(Throwable e) {
9191
@Override
9292
public void onNext(String searchText) {
9393
_log(String.format("onNext You searched for %s", searchText));
94+
onCompleted();
9495
}
9596
};
9697
}
@@ -118,7 +119,7 @@ public void call(Subscriber<? super String> subscriber) {
118119

119120
Timber.d("----------- inside the search observable");
120121
subscriber.onNext(searchText);
121-
subscriber.onCompleted();
122+
// subscriber.onCompleted(); This seems to have no effect.
122123
}
123124
}).subscribeOn(Schedulers.io());
124125
}

0 commit comments

Comments
 (0)