diff options
| author | Paul Frazee <pfrazee@gmail.com> | 2023-11-12 18:13:11 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-12 18:13:11 -0800 |
| commit | b445c15cc99a56c2baf727d05cf53b44aef4542b (patch) | |
| tree | a8b18769ba4987557d4e9b4cd72871f12fb2e1a3 /src/state/persisted | |
| parent | c584a3378d66459c04eee7d98560920e09c5f09f (diff) | |
| download | voidsky-b445c15cc99a56c2baf727d05cf53b44aef4542b.tar.zst | |
Refactor notifications to use react-query (#1878)
* 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>
Diffstat (limited to 'src/state/persisted')
| -rw-r--r-- | src/state/persisted/broadcast/index.ts | 6 | ||||
| -rw-r--r-- | src/state/persisted/broadcast/index.web.ts | 1 | ||||
| -rw-r--r-- | src/state/persisted/index.ts | 2 |
3 files changed, 1 insertions, 8 deletions
diff --git a/src/state/persisted/broadcast/index.ts b/src/state/persisted/broadcast/index.ts deleted file mode 100644 index e0e7f724b..000000000 --- a/src/state/persisted/broadcast/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default class BroadcastChannel { - constructor(public name: string) {} - postMessage(_data: any) {} - close() {} - onmessage: (event: MessageEvent) => void = () => {} -} diff --git a/src/state/persisted/broadcast/index.web.ts b/src/state/persisted/broadcast/index.web.ts deleted file mode 100644 index 33b3548ad..000000000 --- a/src/state/persisted/broadcast/index.web.ts +++ /dev/null @@ -1 +0,0 @@ -export default BroadcastChannel diff --git a/src/state/persisted/index.ts b/src/state/persisted/index.ts index a5c38513f..f6eff4257 100644 --- a/src/state/persisted/index.ts +++ b/src/state/persisted/index.ts @@ -3,7 +3,7 @@ import {logger} from '#/logger' import {defaults, Schema} from '#/state/persisted/schema' import {migrate} from '#/state/persisted/legacy' import * as store from '#/state/persisted/store' -import BroadcastChannel from '#/state/persisted/broadcast' +import BroadcastChannel from '#/lib/broadcast' export type {Schema, PersistedAccount} from '#/state/persisted/schema' export {defaults} from '#/state/persisted/schema' |
