[gnome-shell/gnome-41] extensionSystem: Ignore spurious disable-extension-version-validation change
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gnome-41] extensionSystem: Ignore spurious disable-extension-version-validation change
- Date: Tue, 15 Feb 2022 16:57:30 +0000 (UTC)
commit 9e8dc494f92644e7b3d9f748704aa95fc4328969
Author: Aleksandr Mezin <mezin alexander gmail com>
Date: Sat Nov 20 01:15:37 2021 +0600
extensionSystem: Ignore spurious disable-extension-version-validation change
Ignore spurious change notificatons, when the setting didn't actually change
(triggered by `dconf update`)
Workaround for https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4808
(cherry picked from commit 12c300a7a23016ef956398a91a3831eca55f12d9)
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2180>
js/ui/extensionSystem.js | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/extensionSystem.js b/js/ui/extensionSystem.js
index cc61cab403..b8a0867cde 100644
--- a/js/ui/extensionSystem.js
+++ b/js/ui/extensionSystem.js
@@ -29,6 +29,7 @@ var ExtensionManager = class {
this._unloadedExtensions = new Map();
this._enabledExtensions = [];
this._extensionOrder = [];
+ this._checkVersion = false;
Main.sessionMode.connect('updated', this._sessionUpdated.bind(this));
}
@@ -333,9 +334,7 @@ var ExtensionManager = class {
// Default to error, we set success as the last step
extension.state = ExtensionState.ERROR;
- let checkVersion = !global.settings.get_boolean(EXTENSION_DISABLE_VERSION_CHECK_KEY);
-
- if (checkVersion && ExtensionUtils.isOutOfDate(extension)) {
+ if (this._checkVersion && ExtensionUtils.isOutOfDate(extension)) {
extension.state = ExtensionState.OUT_OF_DATE;
} else if (!this._canLoad(extension)) {
this.logExtensionError(extension.uuid, new Error(
@@ -508,6 +507,12 @@ var ExtensionManager = class {
}
_onVersionValidationChanged() {
+ const checkVersion = !global.settings.get_boolean(EXTENSION_DISABLE_VERSION_CHECK_KEY);
+ if (checkVersion === this._checkVersion)
+ return;
+
+ this._checkVersion = checkVersion;
+
// Disabling extensions modifies the order array, so use a copy
let extensionOrder = this._extensionOrder.slice();
@@ -560,6 +565,8 @@ var ExtensionManager = class {
global.settings.connect('writable-changed::%s'.format(DISABLED_EXTENSIONS_KEY),
this._onSettingsWritableChanged.bind(this));
+ this._onVersionValidationChanged();
+
this._enabledExtensions = this._getEnabledExtensions();
let perUserDir = Gio.File.new_for_path(global.userdatadir);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]