Skip to content

Commit

Permalink
nested
Browse files Browse the repository at this point in the history
view{
 view{ }
 view{ }
}
  • Loading branch information
apikyanrobert committed Oct 31, 2018
1 parent c968bce commit fda1c2c
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ class ViewActionDispatcherLiveData<V : IView> : LiveData<IViewAction<V>>(),
dispatching.set(true)
viewActionObserver.onInvoke(it)
dispatching.set(false)
performPendingActions()
}

private fun performPendingActions() {
Expand All @@ -112,9 +111,7 @@ class ViewActionDispatcherLiveData<V : IView> : LiveData<IViewAction<V>>(),
}

private fun sendImmediate(viewAction: IViewAction<V>) {
if (dispatching.get()) {
addPendingAction(viewAction)
} else if (!isMainThread()) {
if (dispatching.get() || !isMainThread()) {
postValue(viewAction)
} else {
value = viewAction
Expand Down

0 comments on commit fda1c2c

Please sign in to comment.