doridori / Pilot

An android.* decoupled application stack for Android
Apache License 2.0
116 stars 9 forks source link

D-40: PilotFrame.pushed() call should happen after the UISyncer has been made aware of the frame change #40

Closed doridori closed 7 years ago

doridori commented 7 years ago

As PilotFrame.pushed() is a convenient place for a Frame to kick of any logic / processing, it should happen after the UI syncer callback takes place.

The current approach https://github.com/doridori/Pilot/blob/master/android/lib/app/src/main/java/com/kodroid/pilot/lib/stack/PilotStack.java#L102 is open to a racecondition. If we have a Frame perform a stack operation inside of pushed then with the current order, the UI syncer will receive these events in backwards order, as the second pushed frame will hit the notifyListenerVisibleFrameChange call first.

doridori commented 7 years ago

Released in 0.10.2_SNAPSHOT