Bug 445710: Add-on update shows old version while downloading. r=robstrong

This commit is contained in:
Dave Townsend 2008-12-19 12:25:27 +00:00
parent 0f987d9366
commit d3c023f9bb
2 changed files with 8 additions and 3 deletions

View File

@ -924,7 +924,7 @@
<xul:image class="addonIcon" xbl:inherits="src=iconURL"/>
</xul:vbox>
<xul:vbox flex="1" class="addonTextBox">
<xul:hbox class="addon-name-version" xbl:inherits="name, version"/>
<xul:hbox class="addon-name-version" xbl:inherits="name, version=newVersion"/>
<xul:progressmeter class="extension-item-progress" xbl:inherits="value=progress"/>
<xul:label class="extension-item-status" xbl:inherits="value=status" value="&installWaiting.label;"/>
</xul:vbox>

View File

@ -5782,12 +5782,17 @@ ExtensionManager.prototype = {
// being updated during an install.
if (!manager) {
var id = currItem.id
ds.setItemProperties(id, {
var props = {
availableUpdateURL: null,
availableUpdateHash: null,
availableUpdateVersion: null,
availableUpdateInfo: null
});
};
var updateVersion = ds.getItemProperty(id, "availableUpdateVersion");
var updateURL = ds.getItemProperty(id, "availableUpdateURL");
if (updateVersion && (updateURL == currItem.xpiURL))
props.newVersion = EM_L(updateVersion);
ds.setItemProperties(id, props);
ds.updateProperty(id, "availableUpdateURL");
ds.updateProperty(id, "updateable");
}