mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-08-08 06:28:27 -04:00
theme: fix setting color mode when no wallpaper is set in auto mode
fixes #2239
This commit is contained in:
@@ -1801,8 +1801,11 @@ Singleton {
|
|||||||
const iconTheme = (typeof SettingsData !== "undefined" && SettingsData.iconTheme) ? SettingsData.iconTheme : "System Default";
|
const iconTheme = (typeof SettingsData !== "undefined" && SettingsData.iconTheme) ? SettingsData.iconTheme : "System Default";
|
||||||
|
|
||||||
if (currentTheme === dynamic) {
|
if (currentTheme === dynamic) {
|
||||||
if (!rawWallpaperPath)
|
if (!rawWallpaperPath) {
|
||||||
|
log.warn("Auto theme has no wallpaper - skipping matugen, syncing portal mode only");
|
||||||
|
PortalService.setLightMode(isLight);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
const selectedMatugenType = (typeof SettingsData !== "undefined" && SettingsData.matugenScheme) ? SettingsData.matugenScheme : "scheme-tonal-spot";
|
const selectedMatugenType = (typeof SettingsData !== "undefined" && SettingsData.matugenScheme) ? SettingsData.matugenScheme : "scheme-tonal-spot";
|
||||||
const kind = rawWallpaperPath.startsWith("#") ? "hex" : "image";
|
const kind = rawWallpaperPath.startsWith("#") ? "hex" : "image";
|
||||||
setDesiredTheme(kind, rawWallpaperPath, isLight, iconTheme, selectedMatugenType, null);
|
setDesiredTheme(kind, rawWallpaperPath, isLight, iconTheme, selectedMatugenType, null);
|
||||||
|
|||||||
Reference in New Issue
Block a user