fix error when muting users in drawer

This commit is contained in:
hzrd149
2023-12-22 12:36:51 -06:00
parent 00e605214a
commit b264de2686
2 changed files with 2 additions and 5 deletions

View File

@@ -71,8 +71,6 @@ export const ThreadPost = memo(({ post, initShowReplies, focusId, level = -1 }:
</Alert> </Alert>
); );
if (isMuted && replies.length === 0) return null;
const colorProps = useThreadColorLevelProps(level, focusId === post.event.id); const colorProps = useThreadColorLevelProps(level, focusId === post.event.id);
const header = ( const header = (
@@ -139,6 +137,8 @@ export const ThreadPost = memo(({ post, initShowReplies, focusId, level = -1 }:
const ref = useRef<HTMLDivElement | null>(null); const ref = useRef<HTMLDivElement | null>(null);
useRegisterIntersectionEntity(ref, post.event.id); useRegisterIntersectionEntity(ref, post.event.id);
if (isMuted && replies.length === 0) return null;
return ( return (
<> <>
<Flex <Flex

View File

@@ -93,9 +93,6 @@ export default function ThreadView() {
<Spinner /> Loading note <Spinner /> Loading note
</Heading> </Heading>
)} )}
{/* <Code as="pre">
{JSON.stringify({ pointer, rootId, focused: focusedEvent?.id, refs, timelineId, events: events.length }, null, 2)}
</Code> */}
<IntersectionObserverProvider callback={callback}> <IntersectionObserverProvider callback={callback}>
{focusedEvent && rootId ? ( {focusedEvent && rootId ? (
<ThreadPage thread={thread} rootId={rootId} focusId={focusedEvent.id} /> <ThreadPage thread={thread} rootId={rootId} focusId={focusedEvent.id} />