| Index: lib/subscriptionClasses.js |
| =================================================================== |
| --- a/lib/subscriptionClasses.js |
| +++ b/lib/subscriptionClasses.js |
| @@ -54,20 +54,29 @@ |
| /** |
| * Type of the subscription |
| * @type {?string} |
| */ |
| type: null, |
| /** |
| * Filters contained in the filter subscription |
| - * @type {Filter[]} |
| + * @type {Array.<string>} |
| */ |
| filters: null, |
| + /** |
| + * A list of {@link Filter} objects associated with the subscription in some |
| + * way. This is used by {@link INIParser} to temporarily cache objects |
| + * corresponding to the subscription's filter text. |
| + * @type {?Array.<Filter>} |
| + * @package |
| + */ |
| + filterObjects: null, |
| + |
| _title: null, |
| _fixedTitle: false, |
| _disabled: false, |
| /** |
| * Title of the filter subscription |
| * @type {string} |
| */ |
| @@ -146,18 +155,18 @@ |
| }, |
| *serializeFilters() |
| { |
| let {filters} = this; |
| yield "[Subscription filters]"; |
| - for (let filter of filters) |
| - yield filter.text.replace(/\[/g, "\\["); |
| + for (let text of filters) |
| + yield text.replace(/\[/g, "\\["); |
| }, |
| toString() |
| { |
| return [...this.serialize()].join("\n"); |
| } |
| }; |
| @@ -328,17 +337,17 @@ |
| * Creates a new user-defined filter group and adds the given filter to it. |
| * This group will act as the default group for this filter type. |
| * @param {Filter} filter |
| * @return {SpecialSubscription} |
| */ |
| SpecialSubscription.createForFilter = function(filter) |
| { |
| let subscription = SpecialSubscription.create(); |
| - subscription.filters.push(filter); |
| + subscription.filters.push(filter.text); |
| for (let [type, class_] of SpecialSubscription.defaultsMap) |
| { |
| if (filter instanceof class_) |
| subscription.defaults = [type]; |
| } |
| if (!subscription.defaults) |
| subscription.defaults = ["blocking"]; |
| return subscription; |