mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 828944 - downloadavailable flag is removed if you reboot after stopping the download r=ferjm
This commit is contained in:
parent
4e5550547b
commit
e099e975b1
@ -407,6 +407,7 @@ UpdatePrompt.prototype = {
|
||||
// Trigger apps update check and wait for all to be done before
|
||||
// notifying gaia.
|
||||
onUpdateCheckStart: function UP_onUpdateCheckStart() {
|
||||
log("onUpdateCheckStart (" + this._checkingApps + ")");
|
||||
// Don't start twice.
|
||||
if (this._checkingApps) {
|
||||
return;
|
||||
@ -426,8 +427,11 @@ UpdatePrompt.prototype = {
|
||||
this.result.forEach(function updateApp(aApp) {
|
||||
let update = aApp.checkForUpdate();
|
||||
update.onsuccess = function() {
|
||||
if (aApp.downloadAvailable) {
|
||||
appsToUpdate.push(aApp.manifestURL);
|
||||
}
|
||||
|
||||
appsChecked += 1;
|
||||
appsToUpdate.push(aApp.manifestURL);
|
||||
if (appsChecked == appsCount) {
|
||||
self.appsUpdated(appsToUpdate);
|
||||
}
|
||||
|
@ -914,8 +914,6 @@ this.DOMApplicationRegistry = {
|
||||
app.progress = 0;
|
||||
app.installState = download.previousState;
|
||||
app.downloading = false;
|
||||
app.downloadAvailable = false;
|
||||
app.downloadSize = 0;
|
||||
this._saveApps((function() {
|
||||
this.broadcastMessage("Webapps:PackageEvent",
|
||||
{ type: "canceled",
|
||||
@ -968,6 +966,7 @@ this.DOMApplicationRegistry = {
|
||||
manifestURL: aManifestURL,
|
||||
app: app,
|
||||
manifest: jsonManifest });
|
||||
DOMApplicationRegistry._saveApps();
|
||||
}
|
||||
}).bind(this));
|
||||
|
||||
@ -1869,6 +1868,7 @@ this.DOMApplicationRegistry = {
|
||||
manifestURL: aApp.manifestURL,
|
||||
app: app });
|
||||
lastProgressTime = now;
|
||||
self._saveApps();
|
||||
}
|
||||
},
|
||||
onStatus: function notifStatus(aRequest, aContext, aStatus, aStatusArg) { },
|
||||
|
Loading…
Reference in New Issue
Block a user