Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 35c7ccf

Browse files
authored
Merge pull request #5282 from matrix-org/t3chguy/fix/15380
Hide Jump to Read Receipt button for users who have not yet sent an RR
2 parents 3fdefa3 + 2e45374 commit 35c7ccf

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/components/views/right_panel/UserInfo.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -369,11 +369,14 @@ const UserOptionsSection: React.FC<{
369369
});
370370
};
371371

372-
readReceiptButton = (
373-
<AccessibleButton onClick={onReadReceiptButton} className="mx_UserInfo_field">
374-
{ _t('Jump to read receipt') }
375-
</AccessibleButton>
376-
);
372+
const room = cli.getRoom(member.roomId);
373+
if (room?.getEventReadUpTo(member.userId)) {
374+
readReceiptButton = (
375+
<AccessibleButton onClick={onReadReceiptButton} className="mx_UserInfo_field">
376+
{ _t('Jump to read receipt') }
377+
</AccessibleButton>
378+
);
379+
}
377380

378381
insertPillButton = (
379382
<AccessibleButton onClick={onInsertPillButton} className={"mx_UserInfo_field"}>

0 commit comments

Comments
 (0)