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:
@@ -46,7 +46,6 @@ DisplayApp::DisplayApp(Drivers::St7789 &lcd, Components::LittleVgl &lvgl, Driver
|
||||
heartRateController{heartRateController} {
|
||||
msgQueue = xQueueCreate(queueSize, itemSize);
|
||||
onClockApp = true;
|
||||
modal.reset(new Screens::Modal(this));
|
||||
}
|
||||
|
||||
void DisplayApp::Start() {
|
||||
@@ -110,9 +109,6 @@ void DisplayApp::Refresh() {
|
||||
brightnessController.Restore();
|
||||
state = States::Running;
|
||||
break;
|
||||
case Messages::UpdateDateTime:
|
||||
// modal->Show();
|
||||
break;
|
||||
case Messages::UpdateBleConnection:
|
||||
// clockScreen.SetBleConnectionState(bleController.IsConnected() ? Screens::Clock::BleConnectionStates::Connected : Screens::Clock::BleConnectionStates::NotConnected);
|
||||
break;
|
||||
@@ -124,13 +120,10 @@ void DisplayApp::Refresh() {
|
||||
currentScreen.reset(nullptr);
|
||||
lvgl.SetFullRefresh(Components::LittleVgl::FullRefreshDirections::Up);
|
||||
onClockApp = false;
|
||||
currentScreen.reset(new Screens::Notifications(this, notificationManager, Screens::Notifications::Modes::Preview));
|
||||
currentScreen.reset(new Screens::Notifications(this, notificationManager, systemTask.nimble().alertService(), Screens::Notifications::Modes::Preview));
|
||||
}
|
||||
}
|
||||
break;
|
||||
case Messages::NewCall:
|
||||
modal->NewNotification(notificationManager, &systemTask.nimble().alertService());
|
||||
break;
|
||||
case Messages::TouchEvent: {
|
||||
if (state != States::Running) break;
|
||||
auto gesture = OnTouchEvent();
|
||||
@@ -218,7 +211,7 @@ void DisplayApp::RunningState() {
|
||||
case Apps::Music : currentScreen.reset(new Screens::Music(this, systemTask.nimble().music())); break;
|
||||
case Apps::Navigation : currentScreen.reset(new Screens::Navigation(this, systemTask.nimble().navigation())); break;
|
||||
case Apps::FirmwareValidation: currentScreen.reset(new Screens::FirmwareValidation(this, validator)); break;
|
||||
case Apps::Notifications: currentScreen.reset(new Screens::Notifications(this, notificationManager, Screens::Notifications::Modes::Normal)); break;
|
||||
case Apps::Notifications: currentScreen.reset(new Screens::Notifications(this, notificationManager, systemTask.nimble().alertService(), Screens::Notifications::Modes::Normal)); break;
|
||||
case Apps::HeartRate: currentScreen.reset(new Screens::HeartRate(this, heartRateController)); break;
|
||||
}
|
||||
nextApp = Apps::None;
|
||||
|
Reference in New Issue
Block a user