mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-28 17:03:38 +00:00
Fix theme switching to light in auto themes
Signed-off-by: Harry Bond <me@hbond.xyz>
This commit is contained in:
committed by
Konstantin Pastbin
parent
8ed99802ac
commit
1454b3c364
@@ -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));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user