Bug 1130834 - Explictly cancel ongoing download notifications instead of trying to update them to be non-ongoing. r=wesj

This commit is contained in:
Margaret Leibovic 2015-02-22 17:18:39 -08:00
parent 0162c0ab22
commit 7c8e16a52a

View File

@ -219,6 +219,12 @@ DownloadNotification.prototype = {
if (this._show) {
if (!this.id) {
this.id = Notifications.create(this.options);
} else if (!this.options.ongoing) {
// We need to explictly cancel ongoing notifications,
// since updating them to be non-ongoing doesn't seem
// to work. See bug 1130834.
Notifications.cancel(this.id);
this.id = Notifications.create(this.options);
} else {
Notifications.update(this.id, this.options);
}