From bcf616f7bc6dda3cb2bb2b92296b06cbdfbd7999 Mon Sep 17 00:00:00 2001 From: Daniel Thompson Date: Sun, 29 Nov 2020 09:01:08 +0000 Subject: [PATCH] apps: pager: notifications: fix handling of touch messages Currently there are detailed hit boxes in the confirmation view widget but any inaccurate hit is treated as No anyway by the notification app. Additionally selecting 'No' dismisses the whole notification app rather than just the confirmation view. Fix the event handling so that we ignore touches outside the hit box and only dismiss the whole notification app if we actually clear the notifications. Signed-off-by: Daniel Thompson --- wasp/apps/pager.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wasp/apps/pager.py b/wasp/apps/pager.py index f33e9be..15b0bab 100644 --- a/wasp/apps/pager.py +++ b/wasp/apps/pager.py @@ -112,8 +112,9 @@ class NotificationApp(PagerApp): is_confirmed = self.confirmation_view.touch(event) if is_confirmed: wasp.system.notifications = {} - wasp.system.navigate(wasp.EventType.BACK) - self.confirmation_view.active = False + wasp.system.navigate(wasp.EventType.BACK) + elif is_confirmed != None: + self._draw() class CrashApp():