Fix updating settings on page change

This commit is contained in:
Matti Viljanen 2020-04-26 18:22:19 +03:00
parent 71f8f93223
commit c0e8004cc2
No known key found for this signature in database
GPG key ID: CF32A1495158F888

View file

@ -25,7 +25,7 @@ Page {
Timer {
id: settingsTimer
interval: 10
interval: 16
repeat: false
onTriggered: {
// The only setting that can change outside this page
@ -34,8 +34,12 @@ Page {
}
}
onStatusChanged: {
if(status === PageStatus.Activating)
settingsTimer.start()
}
Component.onCompleted: {
// These we can read only once
autoStopCharging.checked = settings.limitEnabled
highLimitSlider.value = settings.highLimit
lowLimitSlider.value = settings.lowLimit