Hide Jump to Read Receipt button for users who have not yet sent an RR

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
pull/21833/head
Michael Telatynski 2020-10-06 08:28:06 +01:00
parent 4f52afdb3c
commit 0bb26831ae
1 changed files with 8 additions and 5 deletions

View File

@ -369,11 +369,14 @@ const UserOptionsSection: React.FC<{
});
};
readReceiptButton = (
<AccessibleButton onClick={onReadReceiptButton} className="mx_UserInfo_field">
{ _t('Jump to read receipt') }
</AccessibleButton>
);
const room = cli.getRoom(member.roomId);
if (room && room.getEventReadUpTo(member.userId)) {
readReceiptButton = (
<AccessibleButton onClick={onReadReceiptButton} className="mx_UserInfo_field">
{ _t('Jump to read receipt') }
</AccessibleButton>
);
}
insertPillButton = (
<AccessibleButton onClick={onInsertPillButton} className={"mx_UserInfo_field"}>