Always restore brightness on app switch (#1213)

This commit is contained in:
Riku Isokoski 2022-07-21 22:16:55 +03:00 committed by GitHub
parent fdad3fc985
commit cea81fea9c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -130,7 +130,6 @@ void DisplayApp::InitHw() {
void DisplayApp::Refresh() { void DisplayApp::Refresh() {
auto LoadPreviousScreen = [this]() { auto LoadPreviousScreen = [this]() {
brightnessController.Set(settingsController.GetBrightness());
LoadApp(returnToApp, returnDirection); LoadApp(returnToApp, returnDirection);
}; };
@ -302,6 +301,8 @@ void DisplayApp::ReturnApp(Apps app, DisplayApp::FullRefreshDirections direction
void DisplayApp::LoadApp(Apps app, DisplayApp::FullRefreshDirections direction) { void DisplayApp::LoadApp(Apps app, DisplayApp::FullRefreshDirections direction) {
touchHandler.CancelTap(); touchHandler.CancelTap();
brightnessController.Set(settingsController.GetBrightness());
currentScreen.reset(nullptr); currentScreen.reset(nullptr);
SetFullRefresh(direction); SetFullRefresh(direction);