store events in SortedMap to avoid sort on render
This commit is contained in:
@ -53,7 +53,6 @@ const Timeline = (props: TimelineProps) => {
|
||||
return followDistance === props.followDistance;
|
||||
};
|
||||
const a = [...nts.filter(a => a.kind !== EventKind.LiveEvent)];
|
||||
props.noSort || a.sort((a, b) => b.created_at - a.created_at);
|
||||
return a
|
||||
?.filter(a => (props.postsOnly ? !a.tags.some(b => b[0] === "e") : true))
|
||||
.filter(a => (props.ignoreModeration || !isEventMuted(a)) && checkFollowDistance(a));
|
||||
|
@ -43,8 +43,7 @@ export function ThreadContextWrapper({ link, children }: { link: NostrLink; chil
|
||||
const chains = new Map<u256, Array<TaggedNostrEvent>>();
|
||||
if (feed.thread) {
|
||||
feed.thread
|
||||
?.sort((a, b) => b.created_at - a.created_at)
|
||||
.filter(a => !isBlocked(a.pubkey))
|
||||
?.filter(a => !isBlocked(a.pubkey))
|
||||
.forEach(v => {
|
||||
const replyTo = replyChainKey(v);
|
||||
if (replyTo) {
|
||||
|
Reference in New Issue
Block a user