Index: lib/filterStorage.js |
=================================================================== |
--- a/lib/filterStorage.js |
+++ b/lib/filterStorage.js |
@@ -123,16 +123,31 @@ |
* @type {number} |
*/ |
get subscriptionCount() |
{ |
return this.knownSubscriptions.size; |
} |
/** |
+ * Adds any subscriptions to which a filter belongs to the filter. |
+ * @param {Filter} filter |
+ */ |
+ addSubscriptionsToFilter(filter) |
+ { |
+ for (let subscription of this.subscriptions()) |
+ { |
+ if (subscription.filters.indexOf(filter) != -1) |
Manish Jethani
2018/11/03 21:31:25
This is super inefficient, but currently it is not
|
+ filter.addSubscription(subscription); |
+ } |
+ |
+ filter.subscriptionsAssigned = true; |
+ } |
+ |
+ /** |
* Finds the filter group that a filter should be added to by default. Will |
* return <code>null</code> if this group doesn't exist yet. |
* @param {Filter} filter |
* @returns {?SpecialSubscription} |
*/ |
getGroupForFilter(filter) |
{ |
let generalSubscription = null; |