summaryrefslogtreecommitdiffstats
path: root/app/bluetooth
diff options
context:
space:
mode:
Diffstat (limited to 'app/bluetooth')
-rw-r--r--app/bluetooth/Bluetooth.qml16
1 files changed, 9 insertions, 7 deletions
diff --git a/app/bluetooth/Bluetooth.qml b/app/bluetooth/Bluetooth.qml
index efc2374..b2b3308 100644
--- a/app/bluetooth/Bluetooth.qml
+++ b/app/bluetooth/Bluetooth.qml
@@ -33,7 +33,14 @@ SettingPage {
bluetooth.send_confirmation(data.pincode)
}
- onPowerChanged: if (!root.checked) root.checked = state
+ onPowerChanged: {
+ if (state) {
+ bluetooth.start_discovery()
+ bluetooth.discoverable = true;
+ }
+ root.checked = state
+ }
+
}
Text {
@@ -46,12 +53,7 @@ SettingPage {
onCheckedChanged: {
console.log("Bluetooth set to", checked)
-
- bluetooth.power = checked;
- bluetooth.discoverable = checked;
-
- if (checked == true)
- bluetooth.start_discovery()
+ bluetooth.power = checked
}
Rectangle {