Use Slider.onMoved for inactivity slider, remove Timer

This commit is contained in:
dsc 2019-04-08 04:13:29 +02:00
parent 19c2208dc4
commit 247f129a24
No known key found for this signature in database
GPG key ID: 7BBC83D7A8810AAB

View file

@ -150,17 +150,8 @@ Rectangle {
color: parent.pressed ? "#f0f0f0" : "#f6f6f6"
border.color: MoneroComponents.Style.grey
}
}
Timer {
// @TODO: Slider.onMoved{} is available in Qt > 5.9, use a hacky timer for now
id: userInactivitySliderTimer
interval: 1000; running: false; repeat: true
onTriggered: {
if(persistentSettings.lockOnUserInActivityInterval != userInactivitySlider.value) {
persistentSettings.lockOnUserInActivityInterval = userInactivitySlider.value;
}
}
onMoved: persistentSettings.lockOnUserInActivityInterval = userInactivitySlider.value;
}
}