Index: lib/filterListener.js |
=================================================================== |
--- a/lib/filterListener.js |
+++ b/lib/filterListener.js |
@@ -135,16 +135,19 @@ |
* if necessary. |
* @param {Filter} filter filter that has been added |
*/ |
function addFilter(filter) |
{ |
if (!(filter instanceof ActiveFilter) || filter.disabled) |
return; |
+ if (!filter.subscriptionsAdded) |
+ filterStorage.addSubscriptionsToFilter(filter); |
+ |
let hasEnabled = false; |
let allowSnippets = false; |
for (let subscription of filter.subscriptions()) |
{ |
if (!subscription.disabled) |
{ |
hasEnabled = true; |
@@ -184,16 +187,19 @@ |
*/ |
function removeFilter(filter) |
{ |
if (!(filter instanceof ActiveFilter)) |
return; |
if (!filter.disabled) |
{ |
+ if (!filter.subscriptionsAdded) |
+ filterStorage.addSubscriptionsToFilter(filter); |
+ |
let hasEnabled = false; |
for (let subscription of filter.subscriptions()) |
{ |
if (!subscription.disabled) |
{ |
hasEnabled = true; |
break; |
} |