From 0bb26831ae0acaf88aba0cdf39f1f19491acfef5 Mon Sep 17 00:00:00 2001
From: Michael Telatynski <7t3chguy@gmail.com>
Date: Tue, 6 Oct 2020 08:28:06 +0100
Subject: [PATCH] Hide Jump to Read Receipt button for users who have not yet
sent an RR
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---
src/components/views/right_panel/UserInfo.tsx | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/src/components/views/right_panel/UserInfo.tsx b/src/components/views/right_panel/UserInfo.tsx
index ecb47e9906..12806766e7 100644
--- a/src/components/views/right_panel/UserInfo.tsx
+++ b/src/components/views/right_panel/UserInfo.tsx
@@ -369,11 +369,14 @@ const UserOptionsSection: React.FC<{
});
};
- readReceiptButton = (
-
- { _t('Jump to read receipt') }
-
- );
+ const room = cli.getRoom(member.roomId);
+ if (room && room.getEventReadUpTo(member.userId)) {
+ readReceiptButton = (
+
+ { _t('Jump to read receipt') }
+
+ );
+ }
insertPillButton = (