Hi everyone,
when the user clicks an item in the navigation main menu, a “START_MAIN_ACTIVITY_REQUESTED” action is dispatched. This is followed by a “CANCEL_REQUESTED” action, which cancels all top level activities.
Here is what I try to do:
I have multiple active activities next to each other. One of them has some input fields which the user can edit (this can lead to a dirty state of the activity). The activity can be closed on a button click, in case the activity is dirty a “DirtyHandling.VetoDialog” is displayed. Based on the user’s decision, the activity is cancelled (or not).
But when the activity is “closed” by clicking an item in the navigation bar, the other activities (except the one which is dirty) get cancelled before SET_CANCEL_CONFIRMATION_REQUIRED is triggered. The result is that only the dirty activity is still visible, the others get cancelled before the user can decide whether he wants to save the entered information or not.
This is the order of actions:
- ACTION: Application/START_MAIN_ACTIVITY_REQUESTED (click on an item in the navigation main menu)
- ACTION: Activity/CANCEL_REQUESTED
- ACTION: Activity/SET_CANCEL_CONFIRMATION_REQUIRED
So my question is:
Is it possible to wait for the user’s confirmation before any activity is cancelled?
Thank you!