feat: update topic lists

This commit is contained in:
2023-11-13 22:55:51 +00:00
parent 24978f4e62
commit 81d6f41050
5 changed files with 287 additions and 32 deletions

View File

@ -39,7 +39,7 @@ const TimelineFollows = (props: TimelineFollowsProps) => {
);
const system = useContext(SnortContext);
const login = useLogin();
const { muted, isMuted } = useModeration();
const { muted, isEventMuted } = useModeration();
const sortedFeed = useMemo(() => orderDescending(feed), [feed]);
@ -49,11 +49,11 @@ const TimelineFollows = (props: TimelineFollowsProps) => {
);
const filterPosts = useCallback(
function <T extends NostrEvent>(nts: Array<T>) {
(nts: Array<TaggedNostrEvent>) => {
const a = nts.filter(a => a.kind !== EventKind.LiveEvent);
return a
?.filter(postsOnly)
.filter(a => !isMuted(a.pubkey) && login.follows.item.includes(a.pubkey) && (props.noteFilter?.(a) ?? true));
.filter(a => !isEventMuted(a) && login.follows.item.includes(a.pubkey) && (props.noteFilter?.(a) ?? true));
},
[postsOnly, muted, login.follows.timestamp],
);