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).
This commit is contained in:
Jean-François Milants 2021-04-04 13:42:22 +02:00
parent 03de1c6739
commit 1b71a10beb

View File

@ -73,6 +73,8 @@ bool Notifications::Refresh() {
} }
bool Notifications::OnTouchEvent(Pinetime::Applications::TouchEvents event) { bool Notifications::OnTouchEvent(Pinetime::Applications::TouchEvents event) {
if(mode != Modes::Normal) return true;
switch (event) { switch (event) {
case Pinetime::Applications::TouchEvents::SwipeUp: { case Pinetime::Applications::TouchEvents::SwipeUp: {
Controllers::NotificationManager::Notification previousNotification; Controllers::NotificationManager::Notification previousNotification;