summaryrefslogtreecommitdiff
path: root/extension.js
diff options
context:
space:
mode:
Diffstat (limited to 'extension.js')
-rw-r--r--extension.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/extension.js b/extension.js
index 718c92d..403d956 100644
--- a/extension.js
+++ b/extension.js
@@ -76,7 +76,7 @@ class BluetoothDevice {
_call_bluetoothctl(command) {
let btctl_command = `echo -e "${command}\\n" | bluetoothctl`;
- Util.spawn(['/bin/bash', '-c', btctl_command]);
+ Util.spawn(['/usr/bin/env', 'bash', '-c', btctl_command]);
}
}
@@ -95,14 +95,15 @@ class BluetoothQuickConnect {
if (isOpen && this._autoPowerOnEnabled())
this._proxy.BluetoothAirplaneMode = false;
});
-
+
this._connectSignal(this._model, 'row-changed', () => this._sync());
this._connectSignal(this._model, 'row-deleted', () => this._sync());
this._connectSignal(this._model, 'row-inserted', () => this._sync());
- this._proxy.BluetoothAirplaneMode = false;
this._idleMonitor();
- this._sync();
+ if (!this._proxy.BluetoothAirplaneMode) {
+ this._sync();
+ }
}
disable() {