extensionDownloader: Only check server if there's something to update

checkForUpdates() will currently always query the server for updates,
even when passing an empty vardict of installed extensions. We know
there won't be any updates in that case, so avoid a pointless network
request.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1100
This commit is contained in:
Florian Müllner 2020-03-15 23:41:27 +01:00 committed by Florian Müllner
parent b80115dc6e
commit 69ea038a8f

View File

@ -127,6 +127,9 @@ function checkForUpdates() {
metadatas[uuid] = extension.metadata;
});
if (Object.keys(metadatas).length === 0)
return; // nothing to update
let versionCheck = global.settings.get_boolean(
'disable-extension-version-validation');
let params = {