Skip to content

Commit

Permalink
modify operators' order
Browse files Browse the repository at this point in the history
  • Loading branch information
nekocode committed Jan 23, 2017
1 parent 6bac50d commit d6e262c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ And then compose it to your original observable.

```
Observable.interval(0, 2, TimeUnit.SECONDS)
.subscribeOn(Schedulers.computation())
.compose(RxLifecycle.bind(MainActivity.this).<Long>withObservable())
.subscribeOn(Schedulers.computation())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<Long>() {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ public void accept(@LifecyclePublisher.Event Integer event) throws Exception {

private void testFlowable() {
Flowable.interval(0, 2, TimeUnit.SECONDS)
.subscribeOn(Schedulers.computation())
.compose(RxLifecycle.bind(this).<Long>withFlowable())
.subscribeOn(Schedulers.computation())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<Long>() {
@Override
Expand All @@ -122,8 +122,8 @@ public void accept(Long n) throws Exception {

private void testObservable() {
Observable.interval(0, 2, TimeUnit.SECONDS)
.subscribeOn(Schedulers.computation())
.compose(RxLifecycle.bind(this).<Long>withObservable())
.subscribeOn(Schedulers.computation())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<Long>() {
@Override
Expand Down

0 comments on commit d6e262c

Please sign in to comment.