Interface: UserSettings

UserSettings

Methods

getIsEnabled() → {boolean}

Gets whether the user has previously enabled Page Previews.

N.B. that if the user hasn't previously enabled or disabled Page Previews, i.e. userSettings.setIsEnabled(true), then they are treated as if they have enabled them.

Source:
Returns:
Type
boolean

getPreviewCount() → {number}

Gets the number of previews that the user has seen.

  • If the storage isn't available, then -1 is returned.
  • If the value in storage is not a number it will override stored value to 0
Source:
Returns:
Type
number

hasIsEnabled() → {boolean}

Gets whether the user has previously enabled or disabled Page Previews.

Source:
Returns:
Type
boolean

setIsEnabled(isEnabled) → {void}

Sets whether the user has enabled Page Previews.

Parameters:
Name Type Description
isEnabled boolean
Source:
Returns:
Type
void

setPreviewCount(count) → {void}

Sets the number of previews that the user has seen.

Parameters:
Name Type Description
count number
Source:
Returns:
Type
void