mirror of https://github.com/vector-im/riot-web
Fix thread panel message deleted preview (#7587)
parent
af8b3c2714
commit
8f7fa07152
|
@ -75,6 +75,7 @@ import AccessibleButton, { ButtonEvent } from '../elements/AccessibleButton';
|
|||
import { CardContext } from '../right_panel/BaseCard';
|
||||
import { copyPlaintext } from '../../../utils/strings';
|
||||
import { DecryptionFailureTracker } from '../../../DecryptionFailureTracker';
|
||||
import RedactedBody from '../messages/RedactedBody';
|
||||
|
||||
const eventTileTypes = {
|
||||
[EventType.RoomMessage]: 'messages.MessageEvent',
|
||||
|
@ -555,8 +556,8 @@ export default class EventTile extends React.Component<IProps, IState> {
|
|||
}
|
||||
|
||||
this.setState({
|
||||
threadLastReply: thread.lastReply,
|
||||
threadReplyCount: thread.length,
|
||||
threadLastReply: thread?.lastReply,
|
||||
threadReplyCount: thread?.length,
|
||||
thread,
|
||||
});
|
||||
};
|
||||
|
@ -1475,7 +1476,10 @@ export default class EventTile extends React.Component<IProps, IState> {
|
|||
>
|
||||
{ this.renderE2EPadlock() }
|
||||
<div className="mx_EventTile_body">
|
||||
{ MessagePreviewStore.instance.generatePreviewForEvent(this.props.mxEvent) }
|
||||
{ this.props.mxEvent.isRedacted()
|
||||
? <RedactedBody mxEvent={this.props.mxEvent} />
|
||||
: MessagePreviewStore.instance.generatePreviewForEvent(this.props.mxEvent)
|
||||
}
|
||||
</div>
|
||||
{ this.renderThreadPanelSummary() }
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue