diff --git a/lifecyclemvp/src/main/java/robertapikyan/com/lifecyclemvp/lifecycle/ViewActionDispatcherLiveData.kt b/lifecyclemvp/src/main/java/robertapikyan/com/lifecyclemvp/lifecycle/ViewActionDispatcherLiveData.kt index 9d72874..8ef4034 100644 --- a/lifecyclemvp/src/main/java/robertapikyan/com/lifecyclemvp/lifecycle/ViewActionDispatcherLiveData.kt +++ b/lifecyclemvp/src/main/java/robertapikyan/com/lifecyclemvp/lifecycle/ViewActionDispatcherLiveData.kt @@ -97,7 +97,6 @@ class ViewActionDispatcherLiveData : LiveData>(), dispatching.set(true) viewActionObserver.onInvoke(it) dispatching.set(false) - performPendingActions() } private fun performPendingActions() { @@ -112,9 +111,7 @@ class ViewActionDispatcherLiveData : LiveData>(), } private fun sendImmediate(viewAction: IViewAction) { - if (dispatching.get()) { - addPendingAction(viewAction) - } else if (!isMainThread()) { + if (dispatching.get() || !isMainThread()) { postValue(viewAction) } else { value = viewAction