bug: thread-to-thread cache reset

This commit is contained in:
Kieran 2023-04-25 11:33:31 +01:00
parent e09df95adf
commit ab2398c2a4
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941
1 changed files with 7 additions and 1 deletions

View File

@ -39,10 +39,16 @@ export default function useThreadFeed(link: NostrLink) {
);
}
return sub;
}, [trackingEvents, trackingATags, allEvents, pref, link.id]);
}, [trackingEvents, trackingATags, allEvents, pref]);
const store = useRequestBuilder<FlatNoteStore>(FlatNoteStore, sub);
useEffect(() => {
setTrackingATags([]);
setTrackingEvent([link.id]);
setAllEvents([link.id]);
}, [link.id]);
useEffect(() => {
if (store.data) {
const mainNotes = store.data?.filter(a => a.kind === EventKind.TextNote || a.kind === EventKind.Polls) ?? [];