Last active
December 17, 2015 23:59
-
-
Save almozavr/5693012 to your computer and use it in GitHub Desktop.
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
@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