diff options
| author | JF002 <JF002@users.noreply.github.com> | 2021-04-26 19:10:11 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-26 19:10:11 (GMT) |
| commit | 4706c99db4c1e05f9dd90f152f2dea08d8f22ab2 (patch) | |
| tree | cf2bea6d67e8d91a7d6222b8e0b55a0075575003 /src/displayapp/screens/Notifications.h | |
| parent | e56ebb8bd621cc8838e86fa032d680a6e7a35ffc (diff) | |
| parent | 69898545193a82f7d72c9f47c9d9de36167b157b (diff) | |
Merge pull request #293 from Avamander/patch-5
Reformatted all the files according to clang-format style
Diffstat (limited to 'src/displayapp/screens/Notifications.h')
| -rw-r--r-- | src/displayapp/screens/Notifications.h | 61 |
1 files changed, 34 insertions, 27 deletions
diff --git a/src/displayapp/screens/Notifications.h b/src/displayapp/screens/Notifications.h index 0d54ddb..51ca81d 100644 --- a/src/displayapp/screens/Notifications.h +++ b/src/displayapp/screens/Notifications.h @@ -14,19 +14,30 @@ namespace Pinetime { namespace Screens { class Notifications : public Screen { - public: - enum class Modes {Normal, Preview}; - explicit Notifications(DisplayApp* app, Pinetime::Controllers::NotificationManager& notificationManager, Pinetime::Controllers::AlertNotificationService& alertNotificationService, Modes mode); - ~Notifications() override; + public: + enum class Modes { Normal, Preview }; + explicit Notifications(DisplayApp* app, + Pinetime::Controllers::NotificationManager& notificationManager, + Pinetime::Controllers::AlertNotificationService& alertNotificationService, + Modes mode); + ~Notifications() override; - bool Refresh() override; - bool OnTouchEvent(Pinetime::Applications::TouchEvents event) override; + bool Refresh() override; + bool OnTouchEvent(Pinetime::Applications::TouchEvents event) override; class NotificationItem { public: - NotificationItem(const char* title, const char* msg, uint8_t notifNr, Controllers::NotificationManager::Categories, uint8_t notifNb, Modes mode, Pinetime::Controllers::AlertNotificationService& alertNotificationService); + NotificationItem(const char* title, + const char* msg, + uint8_t notifNr, + Controllers::NotificationManager::Categories, + uint8_t notifNb, + Modes mode, + Pinetime::Controllers::AlertNotificationService& alertNotificationService); ~NotificationItem(); - bool Refresh() {return false;} + bool Refresh() { + return false; + } void OnAcceptIncomingCall(lv_event_t event); void OnMuteIncomingCall(lv_event_t event); void OnRejectIncomingCall(lv_event_t event); @@ -49,28 +60,24 @@ namespace Pinetime { lv_obj_t* bottomPlaceholder; Modes mode; Pinetime::Controllers::AlertNotificationService& alertNotificationService; - - }; - private: - - - struct NotificationData { - const char* title; - const char* text; - }; - Pinetime::Controllers::NotificationManager& notificationManager; - Pinetime::Controllers::AlertNotificationService& alertNotificationService; - Modes mode = Modes::Normal; - std::unique_ptr<NotificationItem> currentItem; - Controllers::NotificationManager::Notification::Id currentId; - bool validDisplay = false; + private: + struct NotificationData { + const char* title; + const char* text; + }; + Pinetime::Controllers::NotificationManager& notificationManager; + Pinetime::Controllers::AlertNotificationService& alertNotificationService; + Modes mode = Modes::Normal; + std::unique_ptr<NotificationItem> currentItem; + Controllers::NotificationManager::Notification::Id currentId; + bool validDisplay = false; - lv_point_t timeoutLinePoints[2] { {0, 1}, {239, 1} }; - lv_obj_t* timeoutLine; - uint32_t timeoutTickCountStart; - uint32_t timeoutTickCountEnd; + lv_point_t timeoutLinePoints[2] {{0, 1}, {239, 1}}; + lv_obj_t* timeoutLine; + uint32_t timeoutTickCountStart; + uint32_t timeoutTickCountEnd; }; } } |
