You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-07 10:46:24 +03:00
re-apply formatting when editor is closed
This commit is contained in:
@@ -131,8 +131,9 @@ module.exports = React.createClass({
|
|||||||
|
|
||||||
componentDidUpdate: function(prevProps) {
|
componentDidUpdate: function(prevProps) {
|
||||||
if (!this.props.isEditing) {
|
if (!this.props.isEditing) {
|
||||||
|
const stoppedEditing = prevProps.isEditing && !this.props.isEditing;
|
||||||
const messageWasEdited = prevProps.replacingEventId !== this.props.replacingEventId;
|
const messageWasEdited = prevProps.replacingEventId !== this.props.replacingEventId;
|
||||||
if (messageWasEdited) {
|
if (messageWasEdited || stoppedEditing) {
|
||||||
this._applyFormatting();
|
this._applyFormatting();
|
||||||
}
|
}
|
||||||
this.calculateUrlPreview();
|
this.calculateUrlPreview();
|
||||||
|
|||||||
Reference in New Issue
Block a user