From 247f129a2444d6274391d8702fe944e94466eb31 Mon Sep 17 00:00:00 2001 From: dsc Date: Mon, 8 Apr 2019 04:13:29 +0200 Subject: [PATCH] Use Slider.onMoved for inactivity slider, remove Timer --- pages/settings/SettingsLayout.qml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/pages/settings/SettingsLayout.qml b/pages/settings/SettingsLayout.qml index 7a294a2d..b634aebd 100644 --- a/pages/settings/SettingsLayout.qml +++ b/pages/settings/SettingsLayout.qml @@ -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; } }