summaryrefslogtreecommitdiff
path: root/src/displayapp/screens/Notifications.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/displayapp/screens/Notifications.h')
-rw-r--r--src/displayapp/screens/Notifications.h65
1 files changed, 36 insertions, 29 deletions
diff --git a/src/displayapp/screens/Notifications.h b/src/displayapp/screens/Notifications.h
index 0d54ddbe..d5ea5dcb 100644
--- a/src/displayapp/screens/Notifications.h
+++ b/src/displayapp/screens/Notifications.h
@@ -14,24 +14,35 @@ 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);
+ public:
+ 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);
- private:
+ private:
uint8_t notifNr = 0;
uint8_t notifNb = 0;
char pageText[4];
@@ -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;
};
}
}