1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-15 02:02:08 -04:00

fix light mode/dark mode switch for stock themes (#1057)

This commit is contained in:
Oliver Portee
2025-12-15 23:16:23 +01:00
committed by GitHub
parent 2745116ac5
commit 8863c42879

View File

@@ -918,6 +918,7 @@ Singleton {
function buildMatugenColorsFromTheme(darkTheme, lightTheme) { function buildMatugenColorsFromTheme(darkTheme, lightTheme) {
const colors = {}; const colors = {};
const isLight = SessionData !== "undefined" && SessionData.isLightMode;
function addColor(matugenKey, darkVal, lightVal) { function addColor(matugenKey, darkVal, lightVal) {
if (!darkVal && !lightVal) if (!darkVal && !lightVal)
@@ -930,7 +931,7 @@ Singleton {
"color": String(lightVal || darkVal) "color": String(lightVal || darkVal)
}, },
"default": { "default": {
"color": String(darkVal || lightVal) "color": String((isLight && lightVal) ? lightVal : darkVal)
} }
}; };
} }