1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-06 05:28:29 -04:00

gamma: validate config before write and publish state every scheduler

wakeup

fixes #2967
port 1.5

(cherry picked from commit 0c811e3417)
This commit is contained in:
bbedward
2026-08-05 16:55:34 -04:00
committed by dms-ci[bot]
parent c2a7f767c2
commit 8535e3a1d7
3 changed files with 108 additions and 20 deletions
+4
View File
@@ -1155,6 +1155,8 @@ Singleton {
return "Temperature must be between 2500K and 6000K";
const rounded = Math.round(temp / 500) * 500;
if (rounded > SessionData.nightModeHighTemperature)
return "Night temperature must not exceed the day temperature (" + SessionData.nightModeHighTemperature + "K)";
SessionData.setNightModeTemperature(rounded);
if (root.nightModeEnabled) {
@@ -1184,6 +1186,8 @@ Singleton {
return "Temperature must be between 2500K and 6500K";
const rounded = Math.round(temp / 500) * 500;
if (rounded < SessionData.nightModeTemperature)
return "Day temperature must be at least the night temperature (" + SessionData.nightModeTemperature + "K)";
SessionData.setNightModeHighTemperature(rounded);
if (root.nightModeEnabled && SessionData.nightModeAutoEnabled)