Skip to content

Instantly share code, notes, and snippets.

@JEuler
Created March 6, 2019 13:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JEuler/6953bf4f5cc07c641898b8964faa22d8 to your computer and use it in GitHub Desktop.
Save JEuler/6953bf4f5cc07c641898b8964faa22d8 to your computer and use it in GitHub Desktop.
RxGroups helper
protected <T> void autoResubscribe(Observable<T> observable, ResubscriptionObserver<T> resubscriptionObserver) {
if (getObservableGroup() != null && observable != null) {
observable
.compose(getObservableGroup().<T>transform((String) resubscriptionObserver.resubscriptionTag()))
.compose(applySchedulers())
.subscribe(resubscriptionObserver);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment