From 05a19783315e0b22c3f85eca6aa680c7d79cd771 Mon Sep 17 00:00:00 2001 From: Nicolas Fella Date: Fri, 7 Aug 2020 12:56:47 +0200 Subject: [PATCH] [app] Allow refreshing the device list The Android app and the KCM allow forcing a refresh, which is useful sometimes. kdeconnect-app should have that too given we want to replace the KCM. --- app/qml/FindDevicesPage.qml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/app/qml/FindDevicesPage.qml b/app/qml/FindDevicesPage.qml index 1aab33020..4dca4a1e5 100644 --- a/app/qml/FindDevicesPage.qml +++ b/app/qml/FindDevicesPage.qml @@ -26,6 +26,8 @@ import org.kde.kdeconnect 1.0 Kirigami.ScrollablePage { + id: root + Component { id: deviceComp DevicePage {} @@ -33,6 +35,18 @@ Kirigami.ScrollablePage objectName: "FindDevices" title: i18nd("kdeconnect-app", "Pair") + supportsRefreshing: true + + onRefreshingChanged: { + DaemonDbusInterface.forceOnNetworkChange() + refreshResetTimer.start() + } + + Timer { + id: refreshResetTimer + interval: 1000 + onTriggered: root.refreshing = false + } Kirigami.PlaceholderMessage { text: i18nd("kdeconnect-app", "No devices found")