Created
December 19, 2016 02:41
-
-
Save BrantApps/fc1fa0014c40ec50c86e31423218349a to your computer and use it in GitHub Desktop.
Failing Rx-ness
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
Observable.zip( | |
Observable.from(spots), | |
Observable.interval(SYNC_TICK, TimeUnit.MILLISECONDS), | |
(obs, timer) -> obs) | |
.subscribeOn(scheduler) | |
.observeOn(scheduler) | |
.unsubscribeOn(scheduler) | |
.flatMap(spot -> syncTidePosition.get().buildObservable(spot)) | |
.subscribe(spotAndTideEvent -> new TideEventSubscriber( | |
lunaEventService, | |
synchronisationIntentProvider.get(), | |
spotAndTideEvent.spot, | |
String.format( | |
getString(string.tide_error_message), | |
spotAndTideEvent.spot.getTidePosition() | |
), | |
errorHandlerService, | |
localBroadcastManager) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment