extensionSystem: Fix reloading on version-validation changes
The current code only works for enabled extensions, which means that extensions that were marked OUT_OF_DATE cannot be enabled without a restart when disabling the version check. Fix this by reloading all extensions while making sure to only enable any extensions when we're supposed to. https://bugzilla.gnome.org/show_bug.cgi?id=736185
This commit is contained in:
parent
5bd4329b11
commit
4d64bbcf7d
@ -271,10 +271,17 @@ function onEnabledExtensionsChanged() {
|
||||
}
|
||||
|
||||
function _onVersionValidationChanged() {
|
||||
// we want to reload all extensions, but only enable
|
||||
// extensions when allowed by the sessionMode, so
|
||||
// temporarily disable them all
|
||||
enabledExtensions = [];
|
||||
for (let uuid in ExtensionUtils.extensions)
|
||||
reloadExtension(ExtensionUtils.extensions[uuid]);
|
||||
enabledExtensions = getEnabledExtensions();
|
||||
|
||||
if (Main.sessionMode.allowExtensions) {
|
||||
enabledExtensions.forEach(function(uuid) {
|
||||
if (ExtensionUtils.extensions[uuid])
|
||||
reloadExtension(ExtensionUtils.extensions[uuid]);
|
||||
enableExtension(uuid);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user