diff options
author | Andrei Tatar <6143482+andreittr@users.noreply.github.com> | 2019-06-15 14:12:02 +0200 |
---|---|---|
committer | Simon McVittie <smcv@debian.org> | 2019-07-21 14:55:34 +0100 |
commit | 0c3a1209f27f87031edbdd59f10a7fb767ef7ab4 (patch) | |
tree | 37a0e054f7da766a51dd249c54a75bdc364fb2f9 | |
parent | c25d8c9334f1a4f10f09a432179ad1a18fe4346a (diff) |
Do not force-enable BT on extension enable & only do sync if BT on
Forwarded: https://github.com/bjarosze/gnome-bluetooth-quick-connect/pull/8
Applied-upstream: upstream, 9, commit:9d28614c75e76805b808d4b93d77c8dc37bec066
Gbp-Pq: Name Do-not-force-enable-BT-on-extension-enable-only-do-sync-i.patch
-rw-r--r-- | extension.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/extension.js b/extension.js index 0a9b9d2..403d956 100644 --- a/extension.js +++ b/extension.js @@ -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() { |