https://kotlinlang.org logo
#announcements
Title
# announcements
m

morozov

09/22/2017, 3:44 PM
Can i modified this fun in something more sweet:
Copy code
private fun processStickyEvents() {
        EventBus.getDefault().getStickyEvent(AccountsSelectEvent::class.java)?.let { onAccountsSelectEvent(it)  }
        EventBus.getDefault().getStickyEvent(CategoriesSelectEvent::class.java)?.let { onCategoriesSelectEvent(it)  }
        EventBus.getDefault().removeStickyEvent(AccountsSelectEvent::class.java)
        EventBus.getDefault().removeStickyEvent(CategoriesSelectEvent::class.java)
    }
mb something like this?
Copy code
private fun processStickyEvents(Class.name, lambda) {
l

leonardootto

09/22/2017, 5:28 PM
with(EventBus.getDefault()){…}
2 Views