diff options
| -rw-r--r-- | src/displayapp/DisplayApp.cpp | 5 | ||||
| -rw-r--r-- | src/displayapp/screens/Timer.h | 5 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/displayapp/DisplayApp.cpp b/src/displayapp/DisplayApp.cpp index 0ce1002..5c5aad2 100644 --- a/src/displayapp/DisplayApp.cpp +++ b/src/displayapp/DisplayApp.cpp @@ -184,7 +184,10 @@ void DisplayApp::Refresh() { LoadApp(Apps::NotificationsPreview, DisplayApp::FullRefreshDirections::Down); break; case Messages::TimerDone: - if (currentApp != Apps::Timer) { + if (currentApp == Apps::Timer) { + auto* timer = static_cast<Screens::Timer*>(currentScreen.get()); + timer->SetDone(); + } else { LoadApp(Apps::Timer, DisplayApp::FullRefreshDirections::Down); } break; diff --git a/src/displayapp/screens/Timer.h b/src/displayapp/screens/Timer.h index dd55602..3f6d782 100644 --- a/src/displayapp/screens/Timer.h +++ b/src/displayapp/screens/Timer.h @@ -11,14 +11,15 @@ namespace Pinetime::Applications::Screens { class Timer : public Screen { public: - enum class Modes { Normal, Done }; - Timer(DisplayApp* app, Controllers::TimerController& timerController); ~Timer() override; void Refresh() override; void RefreshRunning(); + inline void SetDone() { + RefreshRunning(); + } private: static void btnEventHandler(lv_obj_t* obj, lv_event_t event); inline void OnButtonEvent(lv_obj_t* obj, lv_event_t event) { |
