moderator-toolbox-nxg-for-reddit / modules/betterbuttons/store
modules/betterbuttons/store¶
Functions¶
publishDistinguishState()¶
publishDistinguishState(
thingId,isDistinguished):void
Defined in: extension/data/modules/betterbuttons/store.ts:18
Notifies all listeners registered for thingId of its new distinguished state.
Parameters¶
thingId¶
string
The fullname of the thing whose state changed.
isDistinguished¶
boolean
Whether the thing is now distinguished.
Returns¶
void
subscribeDistinguishState()¶
subscribeDistinguishState(
thingId,listener): () =>void
Defined in: extension/data/modules/betterbuttons/store.ts:28
Registers a listener for the distinguished state of a thing.
Parameters¶
thingId¶
string
The fullname of the thing to watch.
listener¶
DistinguishListener
Called whenever the distinguished state changes.
Returns¶
A cleanup function that removes the listener.
() => void