Class: FilterStateEntry

filterState~FilterStateEntry()

Represents the state for a single filter. See module:filterState~FilterState

Constructor

new FilterStateEntry()

Source:

Members

enabled :boolean

Representation of filter state for the deprecated global enabling and disabling of filters, as well as the filterState.enabled events.

Type:
  • boolean
Deprecated:
  • Prefer isDisabledForSubscription
Source:

hitCount :number

The hit count of the filter.

Type:
  • number
Source:

lastHit :number

The last hit time of the filter in milliseconds since the Unix epoch.

Type:
  • number
Source:

Methods

isDisabledForSubscription(subscriptionUrl) → {boolean}

Check if a filter is disabled for a specified subscription.

Parameters:
Name Type Description
subscriptionUrl string

The subscription to check for enabled / disabled state.

Source:
Returns:
Type
boolean

isEmpty() → {boolean}

Check if the state is empty, so we know if we can clean it up.

Source:
Returns:
Type
boolean

resetEnabled()

Reset the disabled status of this filter to the default of enabled for all subscriptions.

Source:

setDisabledForSubscription(subscriptionUrl, disabled)

Sets the disabled state of a filter.

Parameters:
Name Type Description
subscriptionUrl string

The subscription to enable / disable the filter in.

disabled boolean

The new disabled state of the filter.

Source: