Make threads use new UTD UI (#9876)

* Make threads use new UTD UI
pull/28788/head^2
Janne Mareike Koschinski 2023-01-11 14:03:06 +01:00 committed by GitHub
parent da2640b7ba
commit eeac6df122
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 4 deletions

View File

@ -36,6 +36,7 @@ import { Layout } from "../../../settings/enums/Layout";
import { formatTime } from "../../../DateUtils"; import { formatTime } from "../../../DateUtils";
import { MatrixClientPeg } from "../../../MatrixClientPeg"; import { MatrixClientPeg } from "../../../MatrixClientPeg";
import MatrixClientContext from "../../../contexts/MatrixClientContext"; import MatrixClientContext from "../../../contexts/MatrixClientContext";
import DecryptionFailureBody from "../messages/DecryptionFailureBody";
import { E2EState } from "./E2EIcon"; import { E2EState } from "./E2EIcon";
import RoomAvatar from "../avatars/RoomAvatar"; import RoomAvatar from "../avatars/RoomAvatar";
import MessageContextMenu from "../context_menus/MessageContextMenu"; import MessageContextMenu from "../context_menus/MessageContextMenu";
@ -1329,6 +1330,8 @@ export class UnwrappedEventTile extends React.Component<EventTileProps, IState>
<div className="mx_EventTile_body"> <div className="mx_EventTile_body">
{this.props.mxEvent.isRedacted() ? ( {this.props.mxEvent.isRedacted() ? (
<RedactedBody mxEvent={this.props.mxEvent} /> <RedactedBody mxEvent={this.props.mxEvent} />
) : this.props.mxEvent.isDecryptionFailure() ? (
<DecryptionFailureBody />
) : ( ) : (
MessagePreviewStore.instance.generatePreviewForEvent(this.props.mxEvent) MessagePreviewStore.instance.generatePreviewForEvent(this.props.mxEvent)
)} )}

View File

@ -109,9 +109,19 @@ export const ThreadMessagePreview = ({ thread, showDisplayname = false }: IPrevi
{showDisplayname && ( {showDisplayname && (
<div className="mx_ThreadSummary_sender">{lastReply.sender?.name ?? lastReply.getSender()}</div> <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> {lastReply.isDecryptionFailure() ? (
</div> <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>
)}
</> </>
); );
}; };

View File

@ -2126,6 +2126,7 @@
"%(count)s reply|other": "%(count)s replies", "%(count)s reply|other": "%(count)s replies",
"%(count)s reply|one": "%(count)s reply", "%(count)s reply|one": "%(count)s reply",
"Open thread": "Open thread", "Open thread": "Open thread",
"Unable to decrypt message": "Unable to decrypt message",
"Jump to first unread message.": "Jump to first unread message.", "Jump to first unread message.": "Jump to first unread message.",
"Unable to access your microphone": "Unable to access your microphone", "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.", "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", "Last month": "Last month",
"The beginning of the room": "The beginning of the room", "The beginning of the room": "The beginning of the room",
"Jump to date": "Jump to date", "Jump to date": "Jump to date",
"Unable to decrypt message": "Unable to decrypt message",
"Downloading": "Downloading", "Downloading": "Downloading",
"Decrypting": "Decrypting", "Decrypting": "Decrypting",
"Download": "Download", "Download": "Download",