diff options
| author | Riku Isokoski <riksu9000@gmail.com> | 2021-08-01 10:05:48 (GMT) |
|---|---|---|
| committer | Riku Isokoski <riksu9000@gmail.com> | 2021-08-01 10:05:48 (GMT) |
| commit | e6dcb3009fe6f847a7486dbb1b3143bbf49a15b9 (patch) | |
| tree | a957ff31f9b3509b41b6bc465693e26d56f80d1f /src/displayapp/screens/Notifications.h | |
| parent | 5bdef365f2b8f8e0ba06d04216749205a5bba50d (diff) | |
Improvements
Diffstat (limited to 'src/displayapp/screens/Notifications.h')
| -rw-r--r-- | src/displayapp/screens/Notifications.h | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/src/displayapp/screens/Notifications.h b/src/displayapp/screens/Notifications.h index 32bd077..9244e9f 100644 --- a/src/displayapp/screens/Notifications.h +++ b/src/displayapp/screens/Notifications.h @@ -5,7 +5,6 @@ #include <memory> #include "Screen.h" #include "components/ble/NotificationManager.h" -#include "components/motor/MotorController.h" namespace Pinetime { namespace Controllers { @@ -20,7 +19,6 @@ namespace Pinetime { explicit Notifications(DisplayApp* app, Pinetime::Controllers::NotificationManager& notificationManager, Pinetime::Controllers::AlertNotificationService& alertNotificationService, - Controllers::MotorController& motorController, Modes mode); ~Notifications() override; @@ -35,22 +33,14 @@ namespace Pinetime { Controllers::NotificationManager::Categories, uint8_t notifNb, Modes mode, - Pinetime::Controllers::AlertNotificationService& alertNotificationService, - Controllers::MotorController& motorController, - uint32_t* timeoutEnd, - uint32_t* timeoutStart); + Pinetime::Controllers::AlertNotificationService& alertNotificationService); ~NotificationItem(); - bool Refresh() { - return false; + bool IsRunning() const { + return running; } - void OnAcceptIncomingCall(lv_event_t event); - void OnMuteIncomingCall(lv_event_t event); - void OnRejectIncomingCall(lv_event_t event); - - bool timeoutOnHold = false; + void OnCallButtonEvent(lv_obj_t*, lv_event_t event); + private: - void callPreviewInteraction(); - uint8_t notifNr = 0; uint8_t notifNb = 0; char pageText[4]; @@ -66,11 +56,9 @@ namespace Pinetime { lv_obj_t* label_mute; lv_obj_t* label_reject; lv_obj_t* bottomPlaceholder; - uint32_t* timeoutEnd; - uint32_t* timeoutStart; Modes mode; Pinetime::Controllers::AlertNotificationService& alertNotificationService; - Controllers::MotorController& motorController; + bool running = true; }; private: @@ -83,11 +71,10 @@ namespace Pinetime { Modes mode = Modes::Normal; std::unique_ptr<NotificationItem> currentItem; Controllers::NotificationManager::Notification::Id currentId; - Controllers::MotorController& motorController; bool validDisplay = false; lv_point_t timeoutLinePoints[2] {{0, 1}, {239, 1}}; - lv_obj_t* timeoutLine; + lv_obj_t* timeoutLine = nullptr; uint32_t timeoutTickCountStart; uint32_t timeoutTickCountEnd; }; |
