Skip to content

Instantly share code, notes, and snippets.

@patrykpoborca
Last active February 4, 2016 20:54
Show Gist options
  • Save patrykpoborca/7a9b07e874a86f7171fb to your computer and use it in GitHub Desktop.
Save patrykpoborca/7a9b07e874a86f7171fb to your computer and use it in GitHub Desktop.
getObservable()
.filter { s -> someFilter(s) }
.let{
observable ->
when(exteriorState){
STATE_1 -> observable.debounce(3, TimeUnit.SECONDS);
else -> observable.skip(3, TimeUnit.SECONDS)
}
}
.subscribe{ v ->
//do on sub things
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment