[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:
parent
5657547179
commit
05a1978331
1 changed files with 14 additions and 0 deletions
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue