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

Delta Between Two Patch Sets: lib/notification.js

Issue 6013081427640320: Issue 537 - Mark first few downloads (Closed)
Left Patch Set: Created Nov. 10, 2014, 5:57 p.m.
Right Patch Set: Created Nov. 11, 2014, 5:41 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « lib/downloader.js ('k') | lib/subscriptionClasses.js » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /* 1 /*
2 * This file is part of Adblock Plus <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2014 Eyeo GmbH 3 * Copyright (C) 2006-2014 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 if (typeof Prefs.notificationdata.lastError === "number") 100 if (typeof Prefs.notificationdata.lastError === "number")
101 downloadable.lastError = Prefs.notificationdata.lastError; 101 downloadable.lastError = Prefs.notificationdata.lastError;
102 if (typeof Prefs.notificationdata.lastCheck === "number") 102 if (typeof Prefs.notificationdata.lastCheck === "number")
103 downloadable.lastCheck = Prefs.notificationdata.lastCheck; 103 downloadable.lastCheck = Prefs.notificationdata.lastCheck;
104 if (typeof Prefs.notificationdata.data === "object" && "version" in Prefs.no tificationdata.data) 104 if (typeof Prefs.notificationdata.data === "object" && "version" in Prefs.no tificationdata.data)
105 downloadable.lastVersion = Prefs.notificationdata.data.version; 105 downloadable.lastVersion = Prefs.notificationdata.data.version;
106 if (typeof Prefs.notificationdata.softExpiration === "number") 106 if (typeof Prefs.notificationdata.softExpiration === "number")
107 downloadable.softExpiration = Prefs.notificationdata.softExpiration; 107 downloadable.softExpiration = Prefs.notificationdata.softExpiration;
108 if (typeof Prefs.notificationdata.hardExpiration === "number") 108 if (typeof Prefs.notificationdata.hardExpiration === "number")
109 downloadable.hardExpiration = Prefs.notificationdata.hardExpiration; 109 downloadable.hardExpiration = Prefs.notificationdata.hardExpiration;
110 if ("downloadCount" in Prefs.notificationdata) 110 if (typeof Prefs.notificationdata.downloadCount === "number")
Wladimir Palant 2014/11/10 19:18:15 Should be a number with the comments above address
Thomas Greiner 2014/11/11 17:17:18 Done.
111 downloadable.downloadCount = Prefs.notificationdata.downloadCount; 111 downloadable.downloadCount = Prefs.notificationdata.downloadCount;
112 yield downloadable; 112 yield downloadable;
113 }, 113 },
114 114
115 _onExpirationChange: function(downloadable) 115 _onExpirationChange: function(downloadable)
116 { 116 {
117 Prefs.notificationdata.lastCheck = downloadable.lastCheck; 117 Prefs.notificationdata.lastCheck = downloadable.lastCheck;
118 Prefs.notificationdata.softExpiration = downloadable.softExpiration; 118 Prefs.notificationdata.softExpiration = downloadable.softExpiration;
119 Prefs.notificationdata.hardExpiration = downloadable.hardExpiration; 119 Prefs.notificationdata.hardExpiration = downloadable.hardExpiration;
120 saveNotificationData(); 120 saveNotificationData();
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 triggerQuestionListeners: function(id, approved) 328 triggerQuestionListeners: function(id, approved)
329 { 329 {
330 if (!(id in listeners)) 330 if (!(id in listeners))
331 return; 331 return;
332 let questionListeners = listeners[id]; 332 let questionListeners = listeners[id];
333 for (let listener of questionListeners) 333 for (let listener of questionListeners)
334 listener(approved); 334 listener(approved);
335 } 335 }
336 }; 336 };
337 Notification.init(); 337 Notification.init();
LEFTRIGHT

Powered by Google App Engine
This is Rietveld