diff options
| author | polwex <polwex@sortug.com> | 2025-11-12 07:11:07 +0700 |
|---|---|---|
| committer | polwex <polwex@sortug.com> | 2025-11-12 07:11:07 +0700 |
| commit | 284ce9ce7d9f81e54e91f917329d48926487fbf4 (patch) | |
| tree | 7a156986323fd799e1457c8b7663806e32b2af7d /gui/src/state | |
| parent | 7305d67ff7f9e78b73326ef0e1f68a9613d34205 (diff) | |
fixes to engagement handling
Diffstat (limited to 'gui/src/state')
| -rw-r--r-- | gui/src/state/state.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gui/src/state/state.ts b/gui/src/state/state.ts index f329145..9bd5e0e 100644 --- a/gui/src/state/state.ts +++ b/gui/src/state/state.ts @@ -26,6 +26,7 @@ export type LocalState = { profiles: Map<string, UserProfile>; // pubkey key addProfile: (key: string, u: UserProfile) => void; following: Map<string, FC>; + following2: FC; followers: string[]; // Notifications notifications: Notification[]; @@ -50,7 +51,8 @@ export const useStore = creator((set, get) => ({ await api.subscribeStore((data) => { console.log("store sub", data); if ("state" in data) { - const { feed, nostr, following, relays, profiles, pubkey } = data.state; + const { feed, nostr, following, following2, relays, profiles, pubkey } = + data.state; const flwing = new Map(Object.entries(following as Record<string, FC>)); flwing.set(api!.airlock.our!, feed); set({ @@ -58,6 +60,7 @@ export const useStore = creator((set, get) => ({ nostrFeed: nostr, profiles: new Map(Object.entries(profiles)), following: flwing, + following2, pubkey, }); } else if ("fact" in data) { @@ -103,6 +106,7 @@ export const useStore = creator((set, get) => ({ nostrFeed: [], following: new Map(), followers: [], + following2: { feed: {}, start: "", end: "" }, UISettings: {}, modal: null, setModal: (modal) => set({ modal }), |
