summaryrefslogtreecommitdiff
path: root/src/displayapp/screens/Notifications.cpp
diff options
context:
space:
mode:
authorJF002 <JF002@users.noreply.github.com>2021-03-31 18:33:37 (GMT)
committerGitHub <noreply@github.com>2021-03-31 18:33:37 (GMT)
commit58a2d000c4d49d96121894d6dd6bb861d7564bea (patch)
treee4a941aa36b6db254426bed309c48dd42d79dfd5 /src/displayapp/screens/Notifications.cpp
parent136d4bb85e36777f0f9877fd065476ba1c02ca90 (diff)
parent8eb947a2239d431146de9295e281ee0163fa20e2 (diff)
Merge pull request #238 from nscooling/make_unique
Resolved C++14 Cmake build issues so correctly building to C99/C++14
Diffstat (limited to 'src/displayapp/screens/Notifications.cpp')
-rw-r--r--src/displayapp/screens/Notifications.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/displayapp/screens/Notifications.cpp b/src/displayapp/screens/Notifications.cpp
index 4219bac..c903ed0 100644
--- a/src/displayapp/screens/Notifications.cpp
+++ b/src/displayapp/screens/Notifications.cpp
@@ -17,22 +17,22 @@ Notifications::Notifications(DisplayApp *app,
auto notification = notificationManager.GetLastNotification();
if(notification.valid) {
currentId = notification.id;
- currentItem.reset(new NotificationItem("\nNotification",
+ currentItem = std::make_unique<NotificationItem>("\nNotification",
notification.message.data(),
notification.index,
notification.category,
notificationManager.NbNotifications(),
mode,
- alertNotificationService));
+ alertNotificationService);
validDisplay = true;
} else {
- currentItem.reset(new NotificationItem("\nNotification",
+ currentItem = std::make_unique<NotificationItem>("\nNotification",
"No notification to display",
0,
notification.category,
notificationManager.NbNotifications(),
Modes::Preview,
- alertNotificationService));
+ alertNotificationService);
}
if(mode == Modes::Preview) {
@@ -87,13 +87,13 @@ bool Notifications::OnTouchEvent(Pinetime::Applications::TouchEvents event) {
currentId = previousNotification.id;
currentItem.reset(nullptr);
app->SetFullRefresh(DisplayApp::FullRefreshDirections::Up);
- currentItem.reset(new NotificationItem("\nNotification",
+ currentItem = std::make_unique<NotificationItem>("\nNotification",
previousNotification.message.data(),
previousNotification.index,
previousNotification.category,
notificationManager.NbNotifications(),
mode,
- alertNotificationService));
+ alertNotificationService);
}
return true;
case Pinetime::Applications::TouchEvents::SwipeDown: {
@@ -109,13 +109,13 @@ bool Notifications::OnTouchEvent(Pinetime::Applications::TouchEvents event) {
currentId = nextNotification.id;
currentItem.reset(nullptr);
app->SetFullRefresh(DisplayApp::FullRefreshDirections::Down);
- currentItem.reset(new NotificationItem("\nNotification",
+ currentItem = std::make_unique<NotificationItem>("\nNotification",
nextNotification.message.data(),
nextNotification.index,
nextNotification.category,
notificationManager.NbNotifications(),
mode,
- alertNotificationService));
+ alertNotificationService);
}
return true;
case Pinetime::Applications::TouchEvents::LongTap: {