* Move broadcast channel to lib * Refactor view/com/post/Post and remove temporary 2 components * Add useModerationOpts hook * Refactor notifications to use react-query * Fix: only trigger updates in useModerationOpts when the values have changed * Implement unread notification tracking * Add moderation filtering to notifications * Handle native/push notifications * Remove dead code --------- Co-authored-by: Eric Bailey <git@esb.lol>
11 lines
350 B
TypeScript
11 lines
350 B
TypeScript
export default class BroadcastChannel {
|
|
constructor(public name: string) {}
|
|
postMessage(_data: any) {}
|
|
close() {}
|
|
onmessage: (event: MessageEvent) => void = () => {}
|
|
addEventListener(_type: string, _listener: (event: MessageEvent) => void) {}
|
|
removeEventListener(
|
|
_type: string,
|
|
_listener: (event: MessageEvent) => void,
|
|
) {}
|
|
}
|