diff options
author | JF <jf@codingfield.com> | 2020-10-21 22:15:02 +0200 |
---|---|---|
committer | JF <jf@codingfield.com> | 2020-10-21 22:15:02 +0200 |
commit | cabf1168d429db84b0985e25881ead86d80dde3c (patch) | |
tree | 42f5187cd7de9e947cfe839761cf17662be8210e /src/displayapp | |
parent | 440ae412b9ce9c868aa8b98e6da537bd0ec62de7 (diff) |
Notifications : Fix display of notification index/number.
Diffstat (limited to 'src/displayapp')
-rw-r--r-- | src/displayapp/screens/Notifications.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/displayapp/screens/Notifications.cpp b/src/displayapp/screens/Notifications.cpp index 09365f2e..38a28e12 100644 --- a/src/displayapp/screens/Notifications.cpp +++ b/src/displayapp/screens/Notifications.cpp @@ -11,10 +11,10 @@ Notifications::Notifications(DisplayApp *app, Pinetime::Controllers::Notificatio auto notification = notificationManager.GetLastNotification(); if(notification.valid) { currentId = notification.id; - currentItem.reset(new NotificationItem("Notification", notification.message.data(), notification.index, notification.number, mode)); + currentItem.reset(new NotificationItem("Notification", notification.message.data(), notification.index, notificationManager.NbNotifications(), mode)); validDisplay = true; } else { - currentItem.reset(new NotificationItem("Notification", "No notification to display", 0, 0, mode)); + currentItem.reset(new NotificationItem("Notification", "No notification to display", 0, notificationManager.NbNotifications(), Modes::Preview)); } if(mode == Modes::Preview) { @@ -71,7 +71,7 @@ bool Notifications::OnTouchEvent(Pinetime::Applications::TouchEvents event) { currentId = previousNotification.id; currentItem.reset(nullptr); app->SetFullRefresh(DisplayApp::FullRefreshDirections::Up); - currentItem.reset(new NotificationItem("Notification", previousNotification.message.data(), previousNotification.index, previousNotification.number, mode)); + currentItem.reset(new NotificationItem("Notification", previousNotification.message.data(), previousNotification.index, notificationManager.NbNotifications(), mode)); } return true; case Pinetime::Applications::TouchEvents::SwipeDown: { @@ -87,7 +87,7 @@ bool Notifications::OnTouchEvent(Pinetime::Applications::TouchEvents event) { currentId = nextNotification.id; currentItem.reset(nullptr); app->SetFullRefresh(DisplayApp::FullRefreshDirections::Down); - currentItem.reset(new NotificationItem("Notification", nextNotification.message.data(), nextNotification.index, nextNotification.number, mode)); + currentItem.reset(new NotificationItem("Notification", nextNotification.message.data(), nextNotification.index, notificationManager.NbNotifications(), mode)); } return true; default: |