diff --git a/apps/apps_container.cpp b/apps/apps_container.cpp index b0896a2e6..0b17d1777 100644 --- a/apps/apps_container.cpp +++ b/apps/apps_container.cpp @@ -151,6 +151,12 @@ void AppsContainer::switchTo(App::Snapshot * snapshot) { } } +void AppsContainer::run() { + switchTo(onBoardingAppSnapshot()); + Container::run(); + switchTo(nullptr); +} + bool AppsContainer::updateBatteryState() { if (m_window.updateBatteryLevel() || m_window.updateIsChargingState() || diff --git a/apps/apps_container.h b/apps/apps_container.h index 12119b50e..a4fa4ed44 100644 --- a/apps/apps_container.h +++ b/apps/apps_container.h @@ -43,6 +43,7 @@ public: void suspend(bool checkIfPowerKeyReleased = false); virtual bool dispatchEvent(Ion::Events::Event event) override; void switchTo(App::Snapshot * snapshot) override; + void run() override; bool updateBatteryState(); void refreshPreferences(); void displayExamModePopUp(bool activate); diff --git a/apps/main.cpp b/apps/main.cpp index b1a64538d..61e58bcfb 100644 --- a/apps/main.cpp +++ b/apps/main.cpp @@ -3,7 +3,5 @@ AppsContainer container; void ion_app() { - container.switchTo(container.onBoardingAppSnapshot()); container.run(); - container.switchTo(nullptr); } diff --git a/escher/include/escher/container.h b/escher/include/escher/container.h index e1e4f299c..54ea50e93 100644 --- a/escher/include/escher/container.h +++ b/escher/include/escher/container.h @@ -23,7 +23,7 @@ public: Container(Container&& other) = delete; Container& operator=(const Container& other) = delete; Container& operator=(Container&& other) = delete; - void run(); + virtual void run(); App * activeApp(); virtual bool dispatchEvent(Ion::Events::Event event) override; virtual void switchTo(App::Snapshot * snapshot);