Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Make threads use new UTD UI #9876

Merged
merged 4 commits into from
Jan 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/components/views/rooms/EventTile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -1329,6 +1330,8 @@ export class UnwrappedEventTile extends React.Component<EventTileProps, IState>
<div className="mx_EventTile_body">
{this.props.mxEvent.isRedacted() ? (
<RedactedBody mxEvent={this.props.mxEvent} />
) : this.props.mxEvent.isDecryptionFailure() ? (
<DecryptionFailureBody />
) : (
MessagePreviewStore.instance.generatePreviewForEvent(this.props.mxEvent)
)}
Expand Down
16 changes: 13 additions & 3 deletions src/components/views/rooms/ThreadSummary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,19 @@ export const ThreadMessagePreview = ({ thread, showDisplayname = false }: IPrevi
{showDisplayname && (
<div className="mx_ThreadSummary_sender">{lastReply.sender?.name ?? lastReply.getSender()}</div>
)}
<div className="mx_ThreadSummary_content" title={preview}>
<span className="mx_ThreadSummary_message-preview">{preview}</span>
</div>

{lastReply.isDecryptionFailure() ? (
<div
className="mx_ThreadSummary_content mx_DecryptionFailureBody"
title={_t("Unable to decrypt message")}
>
<span className="mx_ThreadSummary_message-preview">{_t("Unable to decrypt message")}</span>
</div>
) : (
<div className="mx_ThreadSummary_content" title={preview}>
<span className="mx_ThreadSummary_message-preview">{preview}</span>
</div>
)}
</>
);
};
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/strings/en_EN.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down Expand Up @@ -2310,7 +2311,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",
Expand Down