mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-04 13:07:52 +00:00
Bug 812119 - [HOMESCREEN] Must reboot after deleting an app to see its icon disappear from homescreen. r=fabrice
This commit is contained in:
parent
d08b3f224f
commit
49dc71d8fe
@ -749,7 +749,7 @@ WebappsApplicationMgmt.prototype = {
|
|||||||
case "Webapps:Uninstall:Return:OK":
|
case "Webapps:Uninstall:Return:OK":
|
||||||
if (this._onuninstall) {
|
if (this._onuninstall) {
|
||||||
let event = new this._window.MozApplicationEvent("applicationuninstall",
|
let event = new this._window.MozApplicationEvent("applicationuninstall",
|
||||||
{ application : createApplicationObject(this._window, { origin: msg.origin }) });
|
{ application : createApplicationObject(this._window, msg) });
|
||||||
this._onuninstall.handleEvent(event);
|
this._onuninstall.handleEvent(event);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -1508,7 +1508,7 @@ this.DOMApplicationRegistry = {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.webapps[id].removable)
|
if (!app.removable)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Clean up the deprecated manifest cache if needed.
|
// Clean up the deprecated manifest cache if needed.
|
||||||
@ -1539,7 +1539,11 @@ this.DOMApplicationRegistry = {
|
|||||||
delete this.webapps[id];
|
delete this.webapps[id];
|
||||||
|
|
||||||
this._saveApps((function() {
|
this._saveApps((function() {
|
||||||
this.broadcastMessage("Webapps:Uninstall:Return:OK", aData);
|
let detail = {
|
||||||
|
manifestURL: app.manifestURL,
|
||||||
|
origin: aData.origin
|
||||||
|
};
|
||||||
|
this.broadcastMessage("Webapps:Uninstall:Return:OK", detail);
|
||||||
Services.obs.notifyObservers(this, "webapps-sync-uninstall", appNote);
|
Services.obs.notifyObservers(this, "webapps-sync-uninstall", appNote);
|
||||||
this.broadcastMessage("Webapps:RemoveApp", { id: id });
|
this.broadcastMessage("Webapps:RemoveApp", { id: id });
|
||||||
}).bind(this));
|
}).bind(this));
|
||||||
@ -1737,13 +1741,15 @@ this.DOMApplicationRegistry = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let origin = this.webapps[record.id].origin;
|
let origin = this.webapps[record.id].origin;
|
||||||
|
let manifestURL = this.webapps[record.id].manifestURL;
|
||||||
delete this.webapps[record.id];
|
delete this.webapps[record.id];
|
||||||
let dir = this._getAppDir(record.id);
|
let dir = this._getAppDir(record.id);
|
||||||
try {
|
try {
|
||||||
dir.remove(true);
|
dir.remove(true);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
}
|
}
|
||||||
this.broadcastMessage("Webapps:Uninstall:Return:OK", { origin: origin });
|
this.broadcastMessage("Webapps:Uninstall:Return:OK", { origin: origin,
|
||||||
|
manifestURL: manifestURL });
|
||||||
} else {
|
} else {
|
||||||
if (this.webapps[record.id]) {
|
if (this.webapps[record.id]) {
|
||||||
this.webapps[record.id] = record.value;
|
this.webapps[record.id] = record.value;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user