From 9b277f24ddeb4c26948272d3ce76d51aa440b9a2 Mon Sep 17 00:00:00 2001 From: Janne Mareike Koschinski Date: Mon, 9 Jan 2023 01:02:35 +0100 Subject: [PATCH] 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} +
+ )} ); };