From 792b70913c5d43ef3ea3b5bf17e4a2d323f09d31 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 11 Sep 2019 17:29:52 +0100 Subject: [PATCH] invert and rename changed to saveDisabled for clarity Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/views/rooms/EditMessageComposer.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/views/rooms/EditMessageComposer.js b/src/components/views/rooms/EditMessageComposer.js index 89aea64139..a1d6fa618f 100644 --- a/src/components/views/rooms/EditMessageComposer.js +++ b/src/components/views/rooms/EditMessageComposer.js @@ -114,7 +114,7 @@ export default class EditMessageComposer extends React.Component { this._editorRef = null; this.state = { - changed: false, + saveDisabled: true, }; } @@ -247,12 +247,12 @@ export default class EditMessageComposer extends React.Component { } _onChange = () => { - if (this.state.changed || !this._editorRef || !this._editorRef.isModified()) { + if (!this.state.saveDisabled || !this._editorRef || !this._editorRef.isModified()) { return; } this.setState({ - changed: true, + saveDisabled: false, }); }; @@ -269,7 +269,7 @@ export default class EditMessageComposer extends React.Component { />