upon forwarding message to current room, explicitly remove clear from aux

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2017-04-24 20:17:29 +01:00
parent fbca0e0d0d
commit ee560a969a
2 changed files with 3 additions and 1 deletions

View file

@ -1614,7 +1614,7 @@ module.exports = React.createClass({
let aux = null;
if (this.state.forwardingMessage !== null) {
aux = <ForwardMessage onCancelClick={this.onCancelClick} collapsedRhs={this.props.collapsedRhs} content={this.state.forwardingMessage} />;
aux = <ForwardMessage onCancelClick={this.onCancelClick} currentRoomId={this.state.room.roomId} collapsedRhs={this.props.collapsedRhs} content={this.state.forwardingMessage} />;
} else if (this.state.editingRoomSettings) {
aux = <RoomSettings ref="room_settings" onSaveClick={this.onSettingsSaveClick} onCancelClick={this.onCancelClick} room={this.state.room} />;
} else if (this.state.uploadingRoomSettings) {

View file

@ -25,6 +25,7 @@ module.exports = React.createClass({
displayName: 'ForwardMessage',
propTypes: {
currentRoomId: React.PropTypes.string.isRequired,
content: React.PropTypes.object.isRequired,
// true if RightPanel is collapsed
@ -74,6 +75,7 @@ module.exports = React.createClass({
onAction: function(payload) {
if (payload.action === 'view_room') {
MatrixClientPeg.get().sendMessage(payload.room_id, this.props.content);
if (this.props.currentRoomId === payload.room_id) this.props.onCancelClick();
}
},