[gnome-shell] Revert "status/bluetooth: Bail out and hide UI when there's no adapter"
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] Revert "status/bluetooth: Bail out and hide UI when there's no adapter"
- Date: Sat, 26 Feb 2022 15:59:07 +0000 (UTC)
commit 94d9264d96d05d0796898b15f9f11db26f5599a4
Author: Jonas Dreßler <verdre v0yd nl>
Date: Thu Feb 24 18:57:22 2022 +0100
Revert "status/bluetooth: Bail out and hide UI when there's no adapter"
Turns out this broke showing the bluetooth menu entry for adapters which
rely on the had-devices-setup property being set while turned off. These
adapters are completely removed from the system by the firmware after
powering them off, so in that case there is no default adapter anymore,
although we still want to show the menu.
This reverts commit aaf47167b5bb2a4ac15e2cdfdfcac71498dcd7c7.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2214>
js/ui/status/bluetooth.js | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
---
diff --git a/js/ui/status/bluetooth.js b/js/ui/status/bluetooth.js
index 39c2ab62ca..187e106357 100644
--- a/js/ui/status/bluetooth.js
+++ b/js/ui/status/bluetooth.js
@@ -129,20 +129,13 @@ class Indicator extends PanelMenu.SystemIndicator {
}
_sync() {
- const adapterJustAppeared = !this._adapter && this._client.default_adapter;
- this._adapter = this._client.default_adapter ?? null;
- if (!this._adapter) {
- this._item.visible = false;
- this._indicator.visible = false;
- return;
- }
-
const devices = this._getDeviceInfos();
const connectedDevices = devices.filter(dev => dev.connected);
const nConnectedDevices = connectedDevices.length;
- if (!adapterJustAppeared)
+ if (this._client.default_adapter && this._adapter)
this._setHadSetupDevices(devices.length > 0);
+ this._adapter = this._client.default_adapter ?? null;
let sensitive = !Main.sessionMode.isLocked && !Main.sessionMode.isGreeter;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]