aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/modules/bluetooth/BluetoothPage.qml
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/modules/bluetooth/BluetoothPage.qml')
-rw-r--r--desktop/modules/bluetooth/BluetoothPage.qml11
1 files changed, 11 insertions, 0 deletions
diff --git a/desktop/modules/bluetooth/BluetoothPage.qml b/desktop/modules/bluetooth/BluetoothPage.qml
index b47c506..5bfdc0b 100644
--- a/desktop/modules/bluetooth/BluetoothPage.qml
+++ b/desktop/modules/bluetooth/BluetoothPage.qml
@@ -82,6 +82,17 @@ Column {
text: page.bt.adapter && page.bt.adapter.discovering ? "Stop scan" : "Scan"
onClicked: if (page.bt.adapter) page.bt.adapter.discovering = !page.bt.adapter.discovering
}
+
+ // BlueZ discovery runs until stopped, and closing the drawer does not
+ // stop it, so a forgotten scan keeps the radio busy for the session.
+ // Bound to the property rather than started by the button: a manual
+ // stop cancels the clock, and reopening the page re-arms a fresh 60s
+ // on a scan still running from before.
+ Timer {
+ interval: 60000
+ running: page.bt.adapter ? page.bt.adapter.discovering : false
+ onTriggered: if (page.bt.adapter) page.bt.adapter.discovering = false
+ }
}
// --- Connected ---