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

Unified Diff: lib/filterListener.js

Issue 29853570: Issue 6908 - Pass updated subscription's old filters as an event argument (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Rebase Created Aug. 29, 2018, 6:03 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 | lib/filterStorage.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/filterListener.js
===================================================================
--- a/lib/filterListener.js
+++ b/lib/filterListener.js
@@ -266,24 +266,24 @@
{
if (newValue == false)
addFilters(subscription.filters);
else
subscription.filters.forEach(removeFilter);
}
}
-function onSubscriptionUpdated(subscription)
+function onSubscriptionUpdated(subscription, oldFilters)
{
FilterListener.setDirty(1);
if (!subscription.disabled &&
FilterStorage.knownSubscriptions.has(subscription.url))
{
- subscription.oldFilters.forEach(removeFilter);
+ oldFilters.forEach(removeFilter);
addFilters(subscription.filters);
}
}
function onFilterHitCount(filter, newValue)
{
if (newValue == 0)
FilterListener.setDirty(0);
« no previous file with comments | « no previous file | lib/filterStorage.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld