Created
March 1, 2015 03:48
-
-
Save SeongUgJung/60dc45f96ae521c043fe to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
publishSubject = PublishSubject.create(); | |
messageSubscription = publishSubject.observeOn(Schedulers.io()) | |
.subscribe(loadType -> { | |
switch (loadType) { | |
case Saved: | |
getSavedMessageList(); | |
break; | |
case Old: | |
getOldMessageList(messageState.getFirstItemId()); | |
messageListModel.trackGetOldMessage(entityType); | |
break; | |
case New: | |
getNewMessageList(messageState.getLastUpdateLinkId()); | |
break; | |
} | |
}, throwable -> { | |
}, () -> { | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
publishSubject.onNext(LoadType.Old); | |
publishSubject.onNext(LoadType.New); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment