GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

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
Filter options
  • app/src/main/java/com/morihacky/android/rxjava
    • SubjectDebounceSearchEmitterFragment.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

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

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 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 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.