[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.
This commit is contained in:
Nicolas Fella 2020-08-07 12:56:47 +02:00
parent 5657547179
commit 05a1978331

View file

@ -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")