Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private fun fetchAllFacebookAlbums() {
- val subscription = socialPhotosViewModel.getAllFacebookAlbums()
- .subscribeOn(Schedulers.io())
- .observeOn(AndroidSchedulers.mainThread())
- .subscribe(
- {
- state = it
- },
- {
- Timber.e(it.message)
- }
- )
- getCompositeSubscription().add(subscription)
- }
- private fun fetchFacebookAlbum(albumId: String) {
- val subscription = socialPhotosViewModel.getFacebookAlbumFromId(albumId)
- .subscribeOn(Schedulers.io())
- .observeOn(AndroidSchedulers.mainThread())
- .subscribe(
- {
- state = it
- },
- {
- Timber.e(it.message)
- }
- )
- getCompositeSubscription().add(subscription)
- }
- private fun fetchInstagramPhotos(count: Int) {
- val subscription = socialPhotosViewModel.getInstagramPhotos(count)
- .subscribeOn(Schedulers.io())
- .observeOn(AndroidSchedulers.mainThread())
- .subscribe(
- {
- state = it
- },
- {
- Timber.e(it.message)
- }
- )
- getCompositeSubscription().add(subscription)
- }
Add Comment
Please, Sign In to add comment