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

Unified Diff: messageResponder.js

Issue 29533613: Issue 5593 - Return new value from prefs.toggle (Closed) Base URL: https://hg.adblockplus.org/adblockplusui/
Patch Set: Created Sept. 1, 2017, 12:06 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: messageResponder.js
===================================================================
--- a/messageResponder.js
+++ b/messageResponder.js
@@ -342,19 +342,19 @@
});
}
}
});
port.on("prefs.toggle", (message, sender) =>
{
if (message.key == "notifications_ignoredcategories")
- NotificationStorage.toggleIgnoreCategory("*");
- else
- Prefs[message.key] = !Prefs[message.key];
+ return NotificationStorage.toggleIgnoreCategory("*");
Manish Jethani 2017/09/01 12:08:38 It's OK to return undefined here since it's a spec
Thomas Greiner 2017/09/04 10:44:19 Acknowledged.
+
+ return Prefs[message.key] = !Prefs[message.key];
Thomas Greiner 2017/09/04 10:44:19 I assume you're planning to use it in https://code
Manish Jethani 2017/09/04 11:30:02 Yes, specifically line 140 here in the new code:
});
port.on("subscriptions.add", (message, sender) =>
{
let subscription = Subscription.fromURL(message.url);
if ("title" in message)
subscription.title = message.title;
if ("homepage" in message)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld