Created
June 26, 2016 05:45
-
-
Save kaushikgopal/76a6b4c97a193a7461e0b84485913c5e to your computer and use it in GitHub Desktop.
Blog post snippet
This file contains 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<Object> tapEventEmitter = _rxBus.toObserverable().share(); | |
Observable<Object> debouncedEventEmitter = tapEventEmitter.debounce(1, TimeUnit.SECONDS); | |
Observable<List<Object>> debouncedBufferEmitter = tapEventEmitter.buffer(debouncedEventEmitter); | |
debouncedBufferEmitter.buffer(debouncedEventEmitter) | |
.observeOn(AndroidSchedulers.mainThread()) | |
.subscribe(new Action1<List<Object>>() { | |
@Override | |
public void call(List<Object> taps) { | |
_showTapCount(taps.size()); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment