Settings: Fire all events on page load

This commit is contained in:
Daniel 2023-10-24 00:37:11 +02:00
parent 8c7e3e17dc
commit b351c2b8d4
2 changed files with 2 additions and 5 deletions

View File

@ -27,7 +27,8 @@ export function addOnOffTile(conf, icon, name, desc, key, func) {
if (func) item.addEventListener("click", f) if (func) item.addEventListener("click", f)
handleState() handleState()
if (func && conf.changed(key)) f() if (func) f()
document.getElementById("settings").appendChild(item) document.getElementById("settings").appendChild(item)
return item return item
} }

View File

@ -37,10 +37,6 @@ export default class Config {
} }
} }
changed(key) {
return this.get(key) != this.config["ui"][key]
}
getServices() { getServices() {
return this.config["services"] return this.config["services"]
} }