diff --git a/src/systemtask/SystemTask.cpp b/src/systemtask/SystemTask.cpp index 85cefb6f..51dbc3e3 100644 --- a/src/systemtask/SystemTask.cpp +++ b/src/systemtask/SystemTask.cpp @@ -337,15 +337,14 @@ void SystemTask::Work() { break; case Messages::HandleButtonEvent: { // This is for faster wakeup, sacrificing special longpress and doubleclick handling while sleeping - if (IsSleeping()) { - GoToRunning(); - break; - } - Controllers::ButtonActions action; if (nrf_gpio_pin_read(Pinetime::PinMap::Button) == 0) { action = buttonHandler.HandleEvent(Controllers::ButtonHandler::Events::Release); } else { + if (IsSleeping()) { + GoToRunning(); + break; + } action = buttonHandler.HandleEvent(Controllers::ButtonHandler::Events::Press); } HandleButtonAction(action);