fix UX state after button press on dynamic modal

This bug was hidden by the previous return of state before
the reliquish.

Now with the correct ordering, we end up getting a double-relinquish
which ends up trying to swap a modal into focus which doesn't exist.

This fixes that edge case
This commit is contained in:
bunnie 2022-11-09 00:33:13 +08:00
parent 4c45dfa6bf
commit 11a0107e97

View file

@ -194,8 +194,10 @@ impl ActionApi for Notification {
}
_ => {
// relinquish focus before returning the result
self.gam.relinquish_focus().unwrap();
xous::yield_slice();
if self.manual_dismiss {
self.gam.relinquish_focus().unwrap();
xous::yield_slice();
}
send_message(
self.action_conn,