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

Unified Diff: messageResponder.js

Issue 29337773: Issue 2377 - Implement user filter lists toggle (Closed)
Patch Set: Created Feb. 26, 2016, 11:27 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 | « no previous file | options.html » ('j') | options.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: messageResponder.js
===================================================================
--- a/messageResponder.js
+++ b/messageResponder.js
@@ -182,6 +182,16 @@
if (message.what == "options")
ext.showOptions();
break;
+ case "app.userSubscriptionsToggle":
Thomas Greiner 2016/03/01 12:11:22 Please reuse "subscriptions.toggle" for that becau
+ var subscriptions = FilterStorage.subscriptions;
+ for (var i = 0; i < subscriptions.length; i++)
+ {
+ if (subscriptions[i] instanceof SpecialSubscription)
+ subscriptions[i].disabled = message.state;
Thomas Greiner 2016/03/01 12:11:22 It's a "toggle" function so it should toggle the s
+ }
+ FilterNotifier.triggerListeners("app.userSubscriptionsToggle",
Thomas Greiner 2016/03/01 12:11:22 We already have a filter event for that: "subscrip
+ message.state);
+ break;
case "filters.add":
var filter = Filter.fromText(message.text);
var result = require("filterValidation").parseFilter(message.text);
« no previous file with comments | « no previous file | options.html » ('j') | options.js » ('J')

Powered by Google App Engine
This is Rietveld