From 9b277f24ddeb4c26948272d3ce76d51aa440b9a2 Mon Sep 17 00:00:00 2001 From: Janne Mareike Koschinski Date: Mon, 9 Jan 2023 01:02:35 +0100 Subject: [PATCH 1/2] Make threads use new UTD UI --- src/components/views/rooms/EventTile.tsx | 3 +++ src/components/views/rooms/ThreadSummary.tsx | 16 +++++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/components/views/rooms/EventTile.tsx b/src/components/views/rooms/EventTile.tsx index 47e3fea9fdc..ef9257c2e89 100644 --- a/src/components/views/rooms/EventTile.tsx +++ b/src/components/views/rooms/EventTile.tsx @@ -36,6 +36,7 @@ import { Layout } from "../../../settings/enums/Layout"; import { formatTime } from "../../../DateUtils"; import { MatrixClientPeg } from "../../../MatrixClientPeg"; import MatrixClientContext from "../../../contexts/MatrixClientContext"; +import DecryptionFailureBody from "../messages/DecryptionFailureBody"; import { E2EState } from "./E2EIcon"; import RoomAvatar from "../avatars/RoomAvatar"; import MessageContextMenu from "../context_menus/MessageContextMenu"; @@ -1329,6 +1330,8 @@ export class UnwrappedEventTile extends React.Component
{this.props.mxEvent.isRedacted() ? ( + ) : this.props.mxEvent.isDecryptionFailure() ? ( + ) : ( MessagePreviewStore.instance.generatePreviewForEvent(this.props.mxEvent) )} diff --git a/src/components/views/rooms/ThreadSummary.tsx b/src/components/views/rooms/ThreadSummary.tsx index e5185359928..6dabbe189c3 100644 --- a/src/components/views/rooms/ThreadSummary.tsx +++ b/src/components/views/rooms/ThreadSummary.tsx @@ -109,9 +109,19 @@ export const ThreadMessagePreview = ({ thread, showDisplayname = false }: IPrevi {showDisplayname && (
{lastReply.sender?.name ?? lastReply.getSender()}
)} -
- {preview} -
+ + {lastReply.isDecryptionFailure() ? ( +
+ {_t("Unable to decrypt message")} +
+ ) : ( +
+ {preview} +
+ )} ); }; From 22334ce9850815b12ccc10fb76e1d2dff2e1bdcb Mon Sep 17 00:00:00 2001 From: Janne Mareike Koschinski Date: Mon, 9 Jan 2023 01:17:10 +0100 Subject: [PATCH 2/2] Reorder i18n via yarn command --- src/i18n/strings/en_EN.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 952dba45900..443fb90d5dd 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -2125,6 +2125,7 @@ "%(count)s reply|other": "%(count)s replies", "%(count)s reply|one": "%(count)s reply", "Open thread": "Open thread", + "Unable to decrypt message": "Unable to decrypt message", "Jump to first unread message.": "Jump to first unread message.", "Unable to access your microphone": "Unable to access your microphone", "We were unable to access your microphone. Please check your browser settings and try again.": "We were unable to access your microphone. Please check your browser settings and try again.", @@ -2309,7 +2310,6 @@ "Last month": "Last month", "The beginning of the room": "The beginning of the room", "Jump to date": "Jump to date", - "Unable to decrypt message": "Unable to decrypt message", "Downloading": "Downloading", "Decrypting": "Decrypting", "Download": "Download",