From 284ce9ce7d9f81e54e91f917329d48926487fbf4 Mon Sep 17 00:00:00 2001 From: polwex Date: Wed, 12 Nov 2025 07:11:07 +0700 Subject: fixes to engagement handling --- gui/src/state/state.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'gui/src/state/state.ts') 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; // pubkey key addProfile: (key: string, u: UserProfile) => void; following: Map; + 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)); 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 }), -- cgit v1.2.3