From 02876e032f802704b379f5dafd62cba51ca8f780 Mon Sep 17 00:00:00 2001 From: 7w1 Date: Thu, 9 Apr 2026 21:47:30 -0500 Subject: [PATCH] Clean up comments in ThreadBrowser component Removed comments explaining reply count logic. --- src/app/features/room/ThreadBrowser.tsx | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/app/features/room/ThreadBrowser.tsx b/src/app/features/room/ThreadBrowser.tsx index 51a01780b..f5c58cf0d 100644 --- a/src/app/features/room/ThreadBrowser.tsx +++ b/src/app/features/room/ThreadBrowser.tsx @@ -162,18 +162,10 @@ function ThreadPreview({ room, thread, onClick, onJump }: ThreadPreviewProps) { const senderAvatarMxc = getMemberAvatarMxc(room, senderId); const getContent = (() => rootEvent.getContent()) as GetContentCallback; - // Prefer a locally-counted reply count (based on events already in the thread - // timeline) but fall back to thread.length which is the server-reported count - // from bundled m.thread aggregations. This means that for threads discovered - // via fetchRoomThreads() whose timeline hasn't been paginated yet we still - // show the correct count rather than zero. const localReplyCount = thread.events.filter( (ev: MatrixEvent) => ev.getId() !== thread.id && !reactionOrEditEvent(ev) ).length; // Use Math.max so we never show fewer replies than the server reports. - // thread.length is the server-reported count from bundled m.thread aggregations; - // it may slightly overcount reactions but is far more accurate than a partial - // local cache (e.g. 5 loaded vs 22 on server). const replyCount = Math.max(localReplyCount, thread.length ?? 0); const lastReply = thread.events