Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/notification.js

Issue 5730260331003904: Issue 2419 - Show newly downloaded notifications immediately (Closed)
Patch Set: Created June 8, 2015, 8 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/notification.js
===================================================================
--- a/lib/notification.js
+++ b/lib/notification.js
@@ -30,7 +30,6 @@
let INITIAL_DELAY = 12 * MILLIS_IN_MINUTE;
let CHECK_INTERVAL = 1 * MILLIS_IN_HOUR;
let EXPIRATION_INTERVAL = 1 * MILLIS_IN_DAY;
-let STARTUP_SHOW_DELAY = 3 * MILLIS_IN_MINUTE;
let TYPE = {
information: 0,
question: 1,
@@ -87,12 +86,6 @@
downloader.onDownloadSuccess = this._onDownloadSuccess.bind(this);
downloader.onDownloadError = this._onDownloadError.bind(this);
onShutdown.add(() => downloader.cancel());
-
- notificationTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
Felix Dahlke 2015/06/08 20:06:23 While we had IIRC discussed that it makes sense to
- notificationTimer.initWithCallback(Notification.showNext.bind(this),
- STARTUP_SHOW_DELAY,
- Ci.nsITimer.TYPE_ONE_SHOT);
- onShutdown.add(() => notificationTimer.cancel());
},
/**
@@ -152,6 +145,8 @@
[Prefs.notificationdata.softExpiration, Prefs.notificationdata.hardExpiration] = downloader.processExpirationInterval(EXPIRATION_INTERVAL);
Prefs.notificationdata.downloadCount = downloadable.downloadCount;
saveNotificationData();
+
+ Notification.showNext();
},
_onDownloadError: function(downloadable, downloadURL, error, channelStatus, responseStatus, redirectCallback)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld