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:
@@ -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)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user