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 Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2047>
This commit is contained in:
parent
11401c13ed
commit
12c300a7a2
@ -28,6 +28,7 @@ var ExtensionManager = class {
|
|||||||
this._unloadedExtensions = new Map();
|
this._unloadedExtensions = new Map();
|
||||||
this._enabledExtensions = [];
|
this._enabledExtensions = [];
|
||||||
this._extensionOrder = [];
|
this._extensionOrder = [];
|
||||||
|
this._checkVersion = false;
|
||||||
|
|
||||||
Main.sessionMode.connect('updated', this._sessionUpdated.bind(this));
|
Main.sessionMode.connect('updated', this._sessionUpdated.bind(this));
|
||||||
}
|
}
|
||||||
@ -348,9 +349,7 @@ var ExtensionManager = class {
|
|||||||
// Default to error, we set success as the last step
|
// Default to error, we set success as the last step
|
||||||
extension.state = ExtensionState.ERROR;
|
extension.state = ExtensionState.ERROR;
|
||||||
|
|
||||||
let checkVersion = !global.settings.get_boolean(EXTENSION_DISABLE_VERSION_CHECK_KEY);
|
if (this._checkVersion && ExtensionUtils.isOutOfDate(extension)) {
|
||||||
|
|
||||||
if (checkVersion && ExtensionUtils.isOutOfDate(extension)) {
|
|
||||||
extension.state = ExtensionState.OUT_OF_DATE;
|
extension.state = ExtensionState.OUT_OF_DATE;
|
||||||
} else if (!this._canLoad(extension)) {
|
} else if (!this._canLoad(extension)) {
|
||||||
this.logExtensionError(extension.uuid, new Error(
|
this.logExtensionError(extension.uuid, new Error(
|
||||||
@ -525,6 +524,12 @@ var ExtensionManager = class {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_onVersionValidationChanged() {
|
_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
|
// Disabling extensions modifies the order array, so use a copy
|
||||||
let extensionOrder = this._extensionOrder.slice();
|
let extensionOrder = this._extensionOrder.slice();
|
||||||
|
|
||||||
@ -577,6 +582,8 @@ var ExtensionManager = class {
|
|||||||
global.settings.connect('writable-changed::%s'.format(DISABLED_EXTENSIONS_KEY),
|
global.settings.connect('writable-changed::%s'.format(DISABLED_EXTENSIONS_KEY),
|
||||||
this._onSettingsWritableChanged.bind(this));
|
this._onSettingsWritableChanged.bind(this));
|
||||||
|
|
||||||
|
this._onVersionValidationChanged();
|
||||||
|
|
||||||
this._enabledExtensions = this._getEnabledExtensions();
|
this._enabledExtensions = this._getEnabledExtensions();
|
||||||
|
|
||||||
let perUserDir = Gio.File.new_for_path(global.userdatadir);
|
let perUserDir = Gio.File.new_for_path(global.userdatadir);
|
||||||
|
Loading…
Reference in New Issue
Block a user