Fix updating settings on page change
This commit is contained in:
parent
71f8f93223
commit
c0e8004cc2
1 changed files with 6 additions and 2 deletions
|
@ -25,7 +25,7 @@ Page {
|
||||||
|
|
||||||
Timer {
|
Timer {
|
||||||
id: settingsTimer
|
id: settingsTimer
|
||||||
interval: 10
|
interval: 16
|
||||||
repeat: false
|
repeat: false
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
// The only setting that can change outside this page
|
// The only setting that can change outside this page
|
||||||
|
@ -34,8 +34,12 @@ Page {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onStatusChanged: {
|
||||||
|
if(status === PageStatus.Activating)
|
||||||
|
settingsTimer.start()
|
||||||
|
}
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
// These we can read only once
|
|
||||||
autoStopCharging.checked = settings.limitEnabled
|
autoStopCharging.checked = settings.limitEnabled
|
||||||
highLimitSlider.value = settings.highLimit
|
highLimitSlider.value = settings.highLimit
|
||||||
lowLimitSlider.value = settings.lowLimit
|
lowLimitSlider.value = settings.lowLimit
|
||||||
|
|
Loading…
Reference in a new issue