From ac5a04ee9d5d2ac734cf52b27f27e74ed0964f77 Mon Sep 17 00:00:00 2001 From: Tomas Groth Date: Tue, 20 Sep 2022 23:12:20 +0200 Subject: [PATCH 1/2] Send a NewNotification message when a new notification has been created. --- main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.cpp b/main.cpp index 0a1a35c..33da6f8 100644 --- a/main.cpp +++ b/main.cpp @@ -589,6 +589,10 @@ public: if (notification_idx >= notification_messages.size()/2) { notification_idx = 0; } + if (settingsController.GetNotificationStatus() == Pinetime::Controllers::Settings::Notification::On) + { + displayApp.PushMessage(Pinetime::Applications::Display::Messages::NewNotification); + } } // can't use SDL_PollEvent, as those are fed to lvgl From c6b1f0f74bb3893ada8763458c92f8503633e8e7 Mon Sep 17 00:00:00 2001 From: Reinhold Gschweicher Date: Tue, 27 Sep 2022 23:37:45 +0200 Subject: [PATCH 2/2] sim: wake up screen (delete label) when screen off on new Notification Get the system into the running state again, when the `n` button is pressed for a new notification. Otherwise the simulation freezes --- main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.cpp b/main.cpp index 33da6f8..ce04fdd 100644 --- a/main.cpp +++ b/main.cpp @@ -591,6 +591,10 @@ public: } if (settingsController.GetNotificationStatus() == Pinetime::Controllers::Settings::Notification::On) { + if (screen_off_created) { + // wake up! (deletes screen_off label) + systemTask.PushMessage(Pinetime::System::Messages::GoToRunning); + } displayApp.PushMessage(Pinetime::Applications::Display::Messages::NewNotification); } }