From eeac6df122580ea3b5117d40996c535c885392ee Mon Sep 17 00:00:00 2001 From: Janne Mareike Koschinski Date: Wed, 11 Jan 2023 14:03:06 +0100 Subject: [PATCH] Make threads use new UTD UI (#9876) * Make threads use new UTD UI --- src/components/views/rooms/EventTile.tsx | 3 +++ src/components/views/rooms/ThreadSummary.tsx | 16 +++++++++++++--- src/i18n/strings/en_EN.json | 2 +- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/components/views/rooms/EventTile.tsx b/src/components/views/rooms/EventTile.tsx index 47e3fea9fd..ef9257c2e8 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 e518535992..6dabbe189c 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} +
+ )} ); }; diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index bc876ff668..c502cb8f40 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -2126,6 +2126,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.", @@ -2311,7 +2312,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",