Fix url preview display (#28765)

This commit is contained in:
Florian Duros
2024-12-18 17:42:37 +01:00
committed by GitHub
parent 580213da5d
commit 117bee787f
2 changed files with 59 additions and 40 deletions

View File

@@ -128,7 +128,8 @@ export default class TextualBody extends React.Component<IBodyProps, IState> {
if (!this.props.editState) {
const stoppedEditing = prevProps.editState && !this.props.editState;
const messageWasEdited = prevProps.replacingEventId !== this.props.replacingEventId;
if (messageWasEdited || stoppedEditing) {
const urlPreviewChanged = prevProps.showUrlPreview !== this.props.showUrlPreview;
if (messageWasEdited || stoppedEditing || urlPreviewChanged) {
this.applyFormatting();
}
}