Skip to content

Commit 11a0107

Browse files
committed
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
1 parent 4c45dfa commit 11a0107

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

services/gam/src/modal/notification.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,10 @@ impl ActionApi for Notification {
194194
}
195195
_ => {
196196
// relinquish focus before returning the result
197-
self.gam.relinquish_focus().unwrap();
198-
xous::yield_slice();
197+
if self.manual_dismiss {
198+
self.gam.relinquish_focus().unwrap();
199+
xous::yield_slice();
200+
}
199201

200202
send_message(
201203
self.action_conn,

0 commit comments

Comments
 (0)