Hello, I have a question about a strange issue! In...
# announcements
p
Hello, I have a question about a strange issue! In java I can do the following:
Copy code
Object o = new Object() {
                public void onEventMainThread(AnEvent e) {
                    //something here
                    EventBus.getDefault().unregister(this);
                }
            };

            EventBus.getDefault().register(o);
Which in Kotlin translates to:
Copy code
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