Merge pull request #782 from Riksu9000/newer_buttonhandler

Newer ButtonHandler
This commit is contained in:
JF 2021-11-06 10:55:37 +01:00 committed by GitHub
commit 4a5b5f954f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 211 additions and 33 deletions

View file

@ -260,6 +260,20 @@ void DisplayApp::Refresh() {
}
}
break;
case Messages::ButtonLongPressed:
if (currentApp != Apps::Clock) {
LoadApp(Apps::Clock, DisplayApp::FullRefreshDirections::Down);
}
break;
case Messages::ButtonLongerPressed:
// Create reboot app and open it instead
LoadApp(Apps::SysInfo, DisplayApp::FullRefreshDirections::Up);
break;
case Messages::ButtonDoubleClicked:
if (currentApp != Apps::Notifications && currentApp != Apps::NotificationsPreview) {
LoadApp(Apps::Notifications, DisplayApp::FullRefreshDirections::Down);
}
break;
case Messages::BleFirmwareUpdateStarted:
LoadApp(Apps::FirmwareUpdate, DisplayApp::FullRefreshDirections::Down);

View file

@ -9,6 +9,9 @@ namespace Pinetime {
UpdateBleConnection,
TouchEvent,
ButtonPushed,
ButtonLongPressed,
ButtonLongerPressed,
ButtonDoubleClicked,
NewNotification,
TimerDone,
BleFirmwareUpdateStarted,