Improve Settings page loading

This commit is contained in:
Matti Viljanen 2020-03-21 13:12:45 +02:00
parent bfd9c62dcf
commit 366cafde42
No known key found for this signature in database
GPG key ID: CF32A1495158F888

View file

@ -33,14 +33,21 @@ Page {
interval: 10
repeat: false
onTriggered: {
// The only setting that can change outside this page
autoStopCharging.checked = settings.limitEnabled
console.debug("Charger control enabled updated")
}
}
Component.onCompleted: {
// These we can read only once
highLimitSlider.value = settings.highLimit
lowLimitSlider.value = settings.lowLimit
notificationsSwitch.checked = settings.notificationsEnabled
highAlertSlider.value = settings.highAlert
lowAlertSlider.value = settings.lowAlert
intervalSlider.value = settings.interval
}
console.debug("SettingsPage values updated")
}
SilicaFlickable {