From cea81fea9c2892bd9d83ff0ba9ba681db17f718f Mon Sep 17 00:00:00 2001 From: Riku Isokoski Date: Thu, 21 Jul 2022 22:16:55 +0300 Subject: [PATCH] Always restore brightness on app switch (#1213) --- src/displayapp/DisplayApp.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/displayapp/DisplayApp.cpp b/src/displayapp/DisplayApp.cpp index 3174a658..731d9c01 100644 --- a/src/displayapp/DisplayApp.cpp +++ b/src/displayapp/DisplayApp.cpp @@ -130,7 +130,6 @@ void DisplayApp::InitHw() { void DisplayApp::Refresh() { auto LoadPreviousScreen = [this]() { - brightnessController.Set(settingsController.GetBrightness()); LoadApp(returnToApp, returnDirection); }; @@ -302,6 +301,8 @@ void DisplayApp::ReturnApp(Apps app, DisplayApp::FullRefreshDirections direction void DisplayApp::LoadApp(Apps app, DisplayApp::FullRefreshDirections direction) { touchHandler.CancelTap(); + brightnessController.Set(settingsController.GetBrightness()); + currentScreen.reset(nullptr); SetFullRefresh(direction);