summaryrefslogtreecommitdiff
path: root/src/displayapp/screens/Notifications.cpp
diff options
context:
space:
mode:
authorJean-François Milants <jf@codingfield.com>2021-04-04 11:42:22 (GMT)
committerJean-François Milants <jf@codingfield.com>2021-04-04 11:42:22 (GMT)
commit1b71a10bebb63a1b93583d20d657d7accb6b3ddf (patch)
tree1d04870ed5bb89995b122fbeedf4f102d54221d3 /src/displayapp/screens/Notifications.cpp
parent03de1c67393fcb99b5987514be6f470349c57c0f (diff)
Notification app : disable swipe when the app is in 'preview' mode. In this mode, only the new notification should be displayed, there is no point to allow navigating to past notifications.
Works as a workaround for the crash that occurs when you swipe the notification app in preview mode (https://github.com/JF002/InfiniTime/issues/250).
Diffstat (limited to 'src/displayapp/screens/Notifications.cpp')
-rw-r--r--src/displayapp/screens/Notifications.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/displayapp/screens/Notifications.cpp b/src/displayapp/screens/Notifications.cpp
index 457d1e0..5600c0e 100644
--- a/src/displayapp/screens/Notifications.cpp
+++ b/src/displayapp/screens/Notifications.cpp
@@ -73,6 +73,8 @@ bool Notifications::Refresh() {
}
bool Notifications::OnTouchEvent(Pinetime::Applications::TouchEvents event) {
+ if(mode != Modes::Normal) return true;
+
switch (event) {
case Pinetime::Applications::TouchEvents::SwipeUp: {
Controllers::NotificationManager::Notification previousNotification;