[gnome-shell] status/power: Always sync after creating proxy
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] status/power: Always sync after creating proxy
- Date: Mon, 28 Jun 2021 21:20:39 +0000 (UTC)
commit 8430aa59da4cd884047ee827da1702a807ff1572
Author: Florian Müllner <fmuellner gnome org>
Date: Mon Jun 28 18:31:13 2021 +0200
status/power: Always sync after creating proxy
Otherwise the menu remains in an inconsistent state in case of an
error, until something else triggers a call to _sync() (like a
settings change).
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4431
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1901>
js/ui/status/power.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/status/power.js b/js/ui/status/power.js
index a43eeb65ef..c79ff798e9 100644
--- a/js/ui/status/power.js
+++ b/js/ui/status/power.js
@@ -40,10 +40,10 @@ class Indicator extends PanelMenu.SystemIndicator {
(proxy, error) => {
if (error) {
log(error.message);
- return;
+ } else {
+ this._proxy.connect('g-properties-changed',
+ this._sync.bind(this));
}
- this._proxy.connect('g-properties-changed',
- this._sync.bind(this));
this._sync();
});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]