diff --git a/app/containers/MessageBox/index.js b/app/containers/MessageBox/index.js index 5abdcbf4c..273a6bb9f 100644 --- a/app/containers/MessageBox/index.js +++ b/app/containers/MessageBox/index.js @@ -65,7 +65,7 @@ class MessageBox extends Component { replying: PropTypes.bool, editing: PropTypes.bool, threadsEnabled: PropTypes.bool, - isFocused: PropTypes.bool, + isFocused: PropTypes.func, user: PropTypes.shape({ id: PropTypes.string, username: PropTypes.string, @@ -166,7 +166,7 @@ class MessageBox extends Component { componentWillReceiveProps(nextProps) { const { isFocused, editing, replying } = this.props; - if (!isFocused) { + if (!isFocused()) { return; } if (editing !== nextProps.editing && nextProps.editing) { @@ -189,7 +189,7 @@ class MessageBox extends Component { const { roomType, replying, editing, isFocused } = this.props; - if (!isFocused) { + if (!isFocused()) { return false; } if (nextProps.roomType !== roomType) { diff --git a/app/views/RoomView/index.js b/app/views/RoomView/index.js index 6975599d1..a67b40324 100644 --- a/app/views/RoomView/index.js +++ b/app/views/RoomView/index.js @@ -732,7 +732,7 @@ class RoomView extends React.Component { rid={this.rid} tmid={this.tmid} roomType={room.t} - isFocused={navigation.isFocused()} + isFocused={navigation.isFocused} message={selectedMessage} editing={editing} editRequest={this.onEditRequest}