[Pkg-mozext-commits] [adblock-plus] 29/74: Issue 2419 - Show newly downloaded notifications immediately
David Prévot
taffit at moszumanska.debian.org
Tue Aug 11 12:07:07 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository adblock-plus.
commit 714dd4fc2e9dbce48d1d100c06e5264ca27240a9
Author: Felix Dahlke <felix at adblockplus.org>
Date: Mon Jun 8 19:16:36 2015 +0200
Issue 2419 - Show newly downloaded notifications immediately
---
lib/notification.js | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/lib/notification.js b/lib/notification.js
index cf0751c..333f3f4 100644
--- a/lib/notification.js
+++ b/lib/notification.js
@@ -30,7 +30,6 @@ let {Filter} = require("filterClasses");
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 @@ let Notification = exports.Notification =
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);
- notificationTimer.initWithCallback(Notification.showNext.bind(this),
- STARTUP_SHOW_DELAY,
- Ci.nsITimer.TYPE_ONE_SHOT);
- onShutdown.add(() => notificationTimer.cancel());
},
/**
@@ -152,6 +145,8 @@ let Notification = exports.Notification =
[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)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/adblock-plus.git
More information about the Pkg-mozext-commits
mailing list