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

Unified Diff: lib/notificationHelper.js

Issue 29370565: [adblockpluschrome] Issue 4764 - Added "relentless" notification that shows up in intervals (Closed)
Patch Set: Added dependency update Created Jan. 20, 2017, 10:51 a.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 | « dependencies ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/notificationHelper.js
diff --git a/lib/notificationHelper.js b/lib/notificationHelper.js
index 2dc0ce900dcac3aadff84bbe881c3931a9bd341a..e4fb84b49fa31a408c2e8949b87f6eb986c048de 100644
--- a/lib/notificationHelper.js
+++ b/lib/notificationHelper.js
@@ -33,6 +33,7 @@ let displayMethods = Object.create(null);
displayMethods.critical = ["icon", "notification", "popup"];
displayMethods.question = ["notification"];
displayMethods.normal = ["notification"];
+displayMethods.relentless = ["notification"];
displayMethods.information = ["icon", "popup"];
function prepareNotificationIconAndPopup()
@@ -86,7 +87,7 @@ function getNotificationButtons(notificationType, message)
}
];
}
- if (notificationType != "critical")
+ if (["critical", "relentless"].indexOf(notificationType) == -1)
{
buttons.push({
type: "configure",
@@ -226,6 +227,9 @@ function showNotification(notification)
}
}
prepareNotificationIconAndPopup();
+
+ if (notification.type !== "question")
+ NotificationStorage.markAsShown(notification.id);
};
/**
« no previous file with comments | « dependencies ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld