Merge pull request #652 from dyamon/wake-on-notification
Make new notifications refresh idle timer
This commit is contained in:
commit
8165c8676c
|
@ -252,7 +252,8 @@ void SystemTask::Work() {
|
||||||
case Messages::TouchWakeUp: {
|
case Messages::TouchWakeUp: {
|
||||||
if (touchHandler.GetNewTouchInfo()) {
|
if (touchHandler.GetNewTouchInfo()) {
|
||||||
auto gesture = touchHandler.GestureGet();
|
auto gesture = touchHandler.GestureGet();
|
||||||
if (gesture != Pinetime::Drivers::Cst816S::Gestures::None and ((gesture == Pinetime::Drivers::Cst816S::Gestures::DoubleTap and
|
if (gesture != Pinetime::Drivers::Cst816S::Gestures::None and
|
||||||
|
((gesture == Pinetime::Drivers::Cst816S::Gestures::DoubleTap and
|
||||||
settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::DoubleTap)) or
|
settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::DoubleTap)) or
|
||||||
(gesture == Pinetime::Drivers::Cst816S::Gestures::SingleTap and
|
(gesture == Pinetime::Drivers::Cst816S::Gestures::SingleTap and
|
||||||
settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::SingleTap)))) {
|
settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::SingleTap)))) {
|
||||||
|
@ -276,6 +277,8 @@ void SystemTask::Work() {
|
||||||
if (settingsController.GetNotificationStatus() == Pinetime::Controllers::Settings::Notification::ON) {
|
if (settingsController.GetNotificationStatus() == Pinetime::Controllers::Settings::Notification::ON) {
|
||||||
if (isSleeping && !isWakingUp) {
|
if (isSleeping && !isWakingUp) {
|
||||||
GoToRunning();
|
GoToRunning();
|
||||||
|
} else {
|
||||||
|
ReloadIdleTimer();
|
||||||
}
|
}
|
||||||
displayApp.PushMessage(Pinetime::Applications::Display::Messages::NewNotification);
|
displayApp.PushMessage(Pinetime::Applications::Display::Messages::NewNotification);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue