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>
This commit is contained in:
Florian Müllner 2021-06-28 18:31:13 +02:00 committed by Marge Bot
parent 9e9ed42263
commit 8430aa59da

View File

@ -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();
});