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

Unified Diff: lib/notification.js

Issue 29501607: Issue 5459 - Add support to show a notification based on the number of ads blocked (Closed)
Patch Set: Update commit message Created July 31, 2017, 3:19 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
diff --git a/lib/notification.js b/lib/notification.js
index 311e4e881389424155f1a61a3c351a3f69cfaf88..39dfef4047a63ab4cd93023c6d426cd6d9a51a8f 100644
--- a/lib/notification.js
+++ b/lib/notification.js
@@ -304,6 +304,16 @@ let Notification = exports.Notification =
continue;
}
+ if (typeof notification.blocked_total_min == 'number' &&
+ (typeof Prefs.blocked_total != 'number' ||
+ notification.blocked_total_min > Prefs.blocked_total))
+ continue
Wladimir Palant 2017/08/15 10:31:21 Nit: please run ESLint. There should be a semicolo
wspee 2017/08/21 15:18:21 Of course, sorry forgot to use ESLint.
+
+ if (typeof notification.blocked_total_max == 'number' &&
+ (typeof Prefs.blocked_total != 'number' ||
+ notification.blocked_total_max < Prefs.blocked_total))
+ continue
Wladimir Palant 2017/08/15 10:31:21 We should use camelCase for consistency. Also, we
wspee 2017/08/21 15:18:21 I implemented the syntax from the issue (#5457), t
+
if (!notificationToShow ||
getNumericalSeverity(notification) >
getNumericalSeverity(notificationToShow))
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld