GeezerVison is showing github.com — fix: comment no longer holds · devqmr/RxJava-Android-Samples@eb12748
File tree
Expand file treeCollapse file tree
Open diff view settings
app/src/main/java/com/morihacky/android/rxjava
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: app/src/main/java/com/morihacky/android/rxjava/SubjectDebounceSearchEmitterFragment.java -17Lines changed: 0 additions & 17 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
29 | 29 | import static java.lang.String.format; |
30 | 30 | import static rx.android.app.AppObservable.bindFragment; |
31 | 31 |
|
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 | | - */ |
49 | 32 | public class SubjectDebounceSearchEmitterFragment |
50 | 33 | extends BaseFragment { |
51 | 34 |
|
|