Handle call notification the same way than other notifications.
Display the call notifications in the Notification app, with buttons to accept/reject the call.
This commit is contained in:
@@ -19,27 +19,37 @@ namespace Pinetime {
|
||||
bool OnButtonPushed() 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();
|
||||
bool Refresh() {return false;}
|
||||
void OnAcceptIncomingCall(lv_event_t event);
|
||||
void OnRejectIncomingCall(lv_event_t event);
|
||||
|
||||
private:
|
||||
uint8_t notifNr = 0;
|
||||
uint8_t notifNb = 0;
|
||||
char pageText[4];
|
||||
|
||||
lv_obj_t* container1;
|
||||
lv_obj_t* t1;
|
||||
lv_obj_t* l1;
|
||||
lv_obj_t* l2;
|
||||
lv_obj_t* bt_accept;
|
||||
lv_obj_t* bt_reject;
|
||||
lv_obj_t* label_accept;
|
||||
lv_obj_t* label_reject;
|
||||
lv_obj_t* bottomPlaceholder;
|
||||
Modes mode;
|
||||
Pinetime::Controllers::AlertNotificationService& alertNotificationService;
|
||||
|
||||
|
||||
};
|
||||
|
||||
private:
|
||||
bool running = true;
|
||||
|
||||
class NotificationItem {
|
||||
public:
|
||||
NotificationItem(const char* title, const char* msg, uint8_t notifNr, uint8_t notifNb, Modes mode);
|
||||
~NotificationItem();
|
||||
bool Refresh() {return false;}
|
||||
|
||||
private:
|
||||
uint8_t notifNr = 0;
|
||||
uint8_t notifNb = 0;
|
||||
char pageText[4];
|
||||
|
||||
lv_obj_t* container1;
|
||||
lv_obj_t* t1;
|
||||
lv_obj_t* l1;
|
||||
lv_obj_t* bottomPlaceholder;
|
||||
Modes mode;
|
||||
};
|
||||
|
||||
struct NotificationData {
|
||||
const char* title;
|
||||
const char* text;
|
||||
|
Reference in New Issue
Block a user