Skip to content

Instantly share code, notes, and snippets.

@almozavr
Last active December 17, 2015 23:59
Show Gist options
  • Save almozavr/5693012 to your computer and use it in GitHub Desktop.
Save almozavr/5693012 to your computer and use it in GitHub Desktop.
@Override
protected void onStart() {
super.onStart();
App.uiBus.registerSticky(this);
}
@Override
protected void onStop() {
super.onStop();
App.uiBus.unregister(this);
}
protected void onEvent(Object object) {
List<Class<?>> eventTypes = App.uiBus.getEventTypesBySubscriber(this);
eventTypes.remove(Object.class);
if (eventTypes.contains(object.getClass()))
App.uiBus.removeStickyEvent(object);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment