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

Unified Diff: lib/filterStorage.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 | « lib/filterListener.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/filterStorage.js
===================================================================
--- a/lib/filterStorage.js
+++ b/lib/filterStorage.js
@@ -192,21 +192,20 @@
/**
* Replaces the list of filters in a subscription by a new list
* @param {Subscription} subscription filter subscription to be updated
* @param {Filter[]} filters new filter list
*/
updateSubscriptionFilters(subscription, filters)
{
removeSubscriptionFilters(subscription);
- subscription.oldFilters = subscription.filters;
+ let oldFilters = subscription.filters;
subscription.filters = filters;
addSubscriptionFilters(subscription);
- filterNotifier.emit("subscription.updated", subscription);
- delete subscription.oldFilters;
+ filterNotifier.emit("subscription.updated", subscription, oldFilters);
},
/**
* Adds a user-defined filter to the list
* @param {Filter} filter
* @param {SpecialSubscription} [subscription]
* particular group that the filter should be added to
* @param {number} [position]
« no previous file with comments | « lib/filterListener.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld