Hello,
I want to update a badge text upon receipt of an event, but I’ll get the error in the comment:
@EventListener
fun onInvoiceChanged(event: InvoiceChangedEvent) {
// FIXME UI Shared state was accessed from a background thread
// item: SideMenu.MenuItem
appUI.access {
item.badgeText = "test"
}
}
I already tried to obtain the UI in different places: BeforeShowEvent, InitEvent, directly before usage…
appUI = AppUI.getCurrent()
The funny thing is, it works sometimes. Other times it doesn’t an I get the beforementioned error. Any ideas?