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

Side by Side Diff: messageResponder.js

Issue 29479612: Issue 4978 - Include filters with special subscription (Closed) Base URL: https://hg.adblockplus.org/adblockplusui/
Patch Set: Created July 4, 2017, 2:24 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2017 eyeo GmbH 3 * Copyright (C) 2006-2017 eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 if (key in obj) 64 if (key in obj)
65 result[key] = obj[key]; 65 result[key] = obj[key];
66 } 66 }
67 return result; 67 return result;
68 } 68 }
69 69
70 function convertSubscription(subscription) 70 function convertSubscription(subscription)
71 { 71 {
72 let obj = convertObject(["disabled", "downloadStatus", "homepage", 72 let obj = convertObject(["disabled", "downloadStatus", "homepage",
73 "lastDownload", "title", "url"], subscription); 73 "lastDownload", "title", "url"], subscription);
74 if (subscription instanceof SpecialSubscription)
75 obj.filters = subscription.filters.map(convertFilter);
74 obj.isDownloading = Synchronizer.isExecuting(subscription.url); 76 obj.isDownloading = Synchronizer.isExecuting(subscription.url);
75 return obj; 77 return obj;
76 } 78 }
77 79
78 let convertFilter = convertObject.bind(null, ["text"]); 80 let convertFilter = convertObject.bind(null, ["text"]);
79 81
80 let changeListeners = new ext.PageMap(); 82 let changeListeners = new ext.PageMap();
81 let listenedPreferences = Object.create(null); 83 let listenedPreferences = Object.create(null);
82 let listenedFilterChanges = Object.create(null); 84 let listenedFilterChanges = Object.create(null);
83 let messageTypes = new Map([ 85 let messageTypes = new Map([
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 if (message.url) 424 if (message.url)
423 subscriptions = [Subscription.fromURL(message.url)]; 425 subscriptions = [Subscription.fromURL(message.url)];
424 426
425 for (let subscription of subscriptions) 427 for (let subscription of subscriptions)
426 { 428 {
427 if (subscription instanceof DownloadableSubscription) 429 if (subscription instanceof DownloadableSubscription)
428 Synchronizer.execute(subscription, true); 430 Synchronizer.execute(subscription, true);
429 } 431 }
430 }); 432 });
431 })(this); 433 })(this);
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld