From eb776f8e6e8f7faecc6490aaf5ab82d390b22d43 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 29 Jan 2025 00:43:04 -0500 Subject: [PATCH] fx128: Fix "No updates found" if update was already downloaded Previously fixed for fx115 in #3148, but `nsIUpdateManager` changed in fx128 https://forums.zotero.org/discussion/121482/zotero-7-1beta-does-not-find-updates --- chrome/content/zotero/update/updates.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/chrome/content/zotero/update/updates.js b/chrome/content/zotero/update/updates.js index ad3f1a1800..d2149cecc1 100644 --- a/chrome/content/zotero/update/updates.js +++ b/chrome/content/zotero/update/updates.js @@ -600,7 +600,7 @@ var gUpdates = { var um = Cc["@mozilla.org/updates/update-manager;1"].getService( Ci.nsIUpdateManager ); - let activeUpdate = um.downloadingUpdate || um.readyUpdate; + let activeUpdate = um.internal.downloadingUpdate || um.internal.readyUpdate; if (activeUpdate) { this.setUpdate(activeUpdate); aCallback("downloading"); @@ -738,8 +738,8 @@ var gCheckingPage = { LOG("gCheckingPage:onPageShow - Got user approval. Proceeding with download"); // If we resolved because of `aus.stateTransition`, we may actually be // downloading a different update now. - if (this.um.downloadingUpdate) { - this.#update = this.um.downloadingUpdate; + if (this.um.internal.downloadingUpdate) { + this.#update = this.um.internal.downloadingUpdate; } } else { LOG( @@ -927,7 +927,7 @@ var gDownloadingPage = { var um = Cc["@mozilla.org/updates/update-manager;1"].getService( Ci.nsIUpdateManager ); - var activeUpdate = um.downloadingUpdate || um.readyUpdate; + var activeUpdate = um.internal.downloadingUpdate || um.internal.readyUpdate; if (activeUpdate) { gUpdates.setUpdate(activeUpdate); @@ -1085,7 +1085,7 @@ var gDownloadingPage = { var um = Cc["@mozilla.org/updates/update-manager;1"].getService( Ci.nsIUpdateManager ); - um.readyUpdate = gUpdates.update; + um.internal.readyUpdate = gUpdates.update; // Continue download in the background at full speed. LOG( @@ -1480,7 +1480,7 @@ var gFinishedPage = { let um = Cc["@mozilla.org/updates/update-manager;1"].getService( Ci.nsIUpdateManager ); - um.cleanupActiveUpdate(); + um.cleanupActiveUpdates(); gUpdates.never(); gUpdates.wiz.cancel(); },