Fix theme switching to light in auto themes

Signed-off-by: Harry Bond <me@hbond.xyz>
This commit is contained in:
Harry Bond
2025-05-28 16:12:38 +01:00
committed by Konstantin Pastbin
parent 8ed99802ac
commit 1454b3c364

View File

@@ -32,17 +32,17 @@ public enum ThemeSwitcher
@Override
public void run()
{
boolean navAuto = RoutingController.get().isNavigating() && ThemeUtils.isNavAutoTheme(mContext);
boolean isNavAuto = RoutingController.get().isNavigating() && ThemeUtils.isNavAutoTheme(mContext);
// Cancel old checker
UiThread.cancelDelayedTasks(mAutoThemeChecker);
if (navAuto || ThemeUtils.isAutoTheme(mContext))
if (isNavAuto || ThemeUtils.isAutoTheme(mContext))
{
UiThread.runLater(mAutoThemeChecker, CHECK_INTERVAL_MS);
setThemeAndMapStyle(calcAutoTheme());
}
else
setThemeAndMapStyle(Config.getCurrentUiTheme(mContext));
else // Only reached when an auto mode should be light
setThemeAndMapStyle(mContext.getResources().getString(R.string.theme_default));
}
};