Skip to content

Commit eb12748

Browse files
author
Kaushik Gopal
committed
fix: comment no longer holds
1 parent e805667 commit eb12748

1 file changed

Lines changed: 0 additions & 17 deletions

File tree

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

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,6 @@
2929
import static java.lang.String.format;
3030
import static rx.android.app.AppObservable.bindFragment;
3131

32-
/**
33-
* The reason we use a Subject for tracking the search query is because it emits observables.
34-
* Because a Subject subscribes to an Observable, it will trigger that Observable to begin emitting items
35-
* (if that Observable is "cold" — that is, if it waits for a subscription before it begins to emit items).
36-
* This can have the effect of making the resulting Subject a "hot" Observable variant of the original "cold" Observable.
37-
*
38-
* This allows us to create the subject and subscription one time onActivity creation
39-
* Subsequently we send in Observables to the Subject's subscriber onTextChanged
40-
*
41-
* (unlike the way it's done in {@link com.morihacky.android.rxjava.ConcurrencyWithSchedulersDemoFragment#startLongOperation()})
42-
* where we create the subscription on every single event change (OnClick or OnTextchanged) which is
43-
*
44-
* wasteful! : not really since we anyway unsubscribe in OnDestroyView
45-
* less-elegant : as a concept for sure
46-
* simpler actually : adds one more step in the 3 step subscription process, where we create emitter, and then send observables to that emitter)
47-
* incapable of debounce : this is the primary reason, since creating new observable everytime in subscription disregards debounce on subsequent calls
48-
*/
4932
public class SubjectDebounceSearchEmitterFragment
5033
extends BaseFragment {
5134

0 commit comments

Comments
 (0)