To avoid send event in background thread.
@@ -12,9 +12,9 @@ class EventManager<T> : EventBroadcaster<T> {
@Synchronized
fun send(event: T) {
- if (eventLiveDataImp.value == null) {
+ if (currentEvent == null) {
currentEvent = event
- eventLiveDataImp.value = currentEvent
+ eventLiveDataImp.postValue(currentEvent)
} else {
queue.offer(event)
}