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: Created March 22, 2018, 2:43 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
Index: lib/notificationHelper.js
diff --git a/lib/notificationHelper.js b/lib/notificationHelper.js
index f00b736eb4e2acf91ea3140e1b7337f7fe89963c..f17657e5db4ce7a8abee24be0983c0bea7328f7f 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));

Powered by Google App Engine
This is Rietveld