diff options
author | Jean-François Milants <jf@codingfield.com> | 2022-09-11 14:59:49 +0200 |
---|---|---|
committer | Jean-François Milants <jf@codingfield.com> | 2022-09-11 14:59:49 +0200 |
commit | ada2c09581d2d13acfa5ce9a97671c0ec17863f1 (patch) | |
tree | 2f776adc59d0c63e403d2043cb8460e65d6c46fe /src/displayapp/screens/Notifications.h | |
parent | 18cff286c75f432095db4b188e0f9a8a9e2bd8e8 (diff) | |
parent | c9a5c3fa5c930a5939d3114a6c6b48570d61ca24 (diff) |
Merge branch 'develop' into infineat-external-resources
# Conflicts:
# src/displayapp/screens/Symbols.h
# src/displayapp/screens/settings/SettingWatchFace.cpp
# src/displayapp/screens/settings/SettingWatchFace.h
Diffstat (limited to 'src/displayapp/screens/Notifications.h')
-rw-r--r-- | src/displayapp/screens/Notifications.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/displayapp/screens/Notifications.h b/src/displayapp/screens/Notifications.h index 74160356..9d843a9b 100644 --- a/src/displayapp/screens/Notifications.h +++ b/src/displayapp/screens/Notifications.h @@ -33,12 +33,13 @@ namespace Pinetime { class NotificationItem { public: + NotificationItem(Pinetime::Controllers::AlertNotificationService& alertNotificationService, + Pinetime::Controllers::MotorController& motorController); NotificationItem(const char* title, const char* msg, uint8_t notifNr, Controllers::NotificationManager::Categories, uint8_t notifNb, - Modes mode, Pinetime::Controllers::AlertNotificationService& alertNotificationService, Pinetime::Controllers::MotorController& motorController); ~NotificationItem(); @@ -48,16 +49,17 @@ namespace Pinetime { void OnCallButtonEvent(lv_obj_t*, lv_event_t event); private: - lv_obj_t* container1; + lv_obj_t* container; + lv_obj_t* subject_container; lv_obj_t* bt_accept; lv_obj_t* bt_mute; lv_obj_t* bt_reject; lv_obj_t* label_accept; lv_obj_t* label_mute; lv_obj_t* label_reject; - Modes mode; Pinetime::Controllers::AlertNotificationService& alertNotificationService; Pinetime::Controllers::MotorController& motorController; + bool running = true; }; @@ -68,15 +70,19 @@ namespace Pinetime { System::SystemTask& systemTask; Modes mode = Modes::Normal; std::unique_ptr<NotificationItem> currentItem; - Controllers::NotificationManager::Notification::Id currentId; + Pinetime::Controllers::NotificationManager::Notification::Id currentId; bool validDisplay = false; + bool afterDismissNextMessageFromAbove = false; lv_point_t timeoutLinePoints[2] {{0, 1}, {239, 1}}; lv_obj_t* timeoutLine = nullptr; TickType_t timeoutTickCountStart; + static const TickType_t timeoutLength = pdMS_TO_TICKS(7000); bool interacted = true; + bool dismissingNotification = false; + lv_task_t* taskRefresh; }; } |