apps: pager: notifications: improve swipe handling
Currently the swipe handling added for the confirmation view has a number of prolems: it does not work at all for multi-screen notifications, it interferes with the haptic feedback if we keep swiping down and an up swipe incorrectly dismisses whole notification app. Fix these. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
This commit is contained in:
parent
c6d5e841a0
commit
057c140f0e
1 changed files with 11 additions and 4 deletions
|
@ -99,11 +99,18 @@ class NotificationApp(PagerApp):
|
||||||
super().background()
|
super().background()
|
||||||
|
|
||||||
def swipe(self, event):
|
def swipe(self, event):
|
||||||
if event[0] == wasp.EventType.DOWN:
|
if self.confirmation_view.active:
|
||||||
|
if event[0] == wasp.EventType.UP:
|
||||||
|
self.confirmation_view.active = False
|
||||||
|
self._draw()
|
||||||
|
return
|
||||||
|
else:
|
||||||
|
if event[0] == wasp.EventType.DOWN and self._page == 0:
|
||||||
self.confirmation_view.active = True
|
self.confirmation_view.active = True
|
||||||
self._draw()
|
self._draw()
|
||||||
super().swipe(event)
|
return
|
||||||
|
|
||||||
|
super().swipe(event)
|
||||||
|
|
||||||
def _draw(self):
|
def _draw(self):
|
||||||
if self.confirmation_view.active:
|
if self.confirmation_view.active:
|
||||||
|
|
Loading…
Reference in a new issue