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