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

Unified Diff: lib/notificationHelper.js

Issue 29730611: Issue 6511 - Use messaging to register popup notification clicks (Closed)
Patch Set: Updated dependency Created March 23, 2018, 4:37 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 | « dependencies ('k') | popup.js » ('j') | 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 d0ecabecf5c60b337ebdbf329fcc1ca083d48cac..49a8def40ec93651be93c16fe551d15803042d6e 100644
--- a/lib/notificationHelper.js
+++ b/lib/notificationHelper.js
@@ -294,6 +294,15 @@ exports.shouldDisplay = (method, notificationType) =>
return methods.includes(method);
};
+/**
+ * Tidies up after a notification was clicked.
+ */
+exports.notificationClicked = () =>
+{
+ if (activeNotification)
+ activeNotification.onClicked();
+};
+
ext.pages.onLoading.addListener(page =>
{
NotificationStorage.showNext(stringifyURL(page.url));
« no previous file with comments | « dependencies ('k') | popup.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld