pavlospt
01/26/2017, 2:02 PMObject o = new Object() {
public void onEventMainThread(AnEvent e) {
//something here
EventBus.getDefault().unregister(this);
}
};
EventBus.getDefault().register(o);
Which in Kotlin translates to:
val o = object : Any() {
fun onEventMainThread(e: AnEvent) {
//something here
EventBus.getDefault().unregister(this)
}
}
EventBus.getDefault().register(o)
But in Kotlin it doesnt seem to receive the event