upon forwarding message to current room, explicitly remove clear from aux
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
fbca0e0d0d
commit
ee560a969a
2 changed files with 3 additions and 1 deletions
|
@ -1614,7 +1614,7 @@ module.exports = React.createClass({
|
||||||
|
|
||||||
let aux = null;
|
let aux = null;
|
||||||
if (this.state.forwardingMessage !== 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) {
|
} else if (this.state.editingRoomSettings) {
|
||||||
aux = <RoomSettings ref="room_settings" onSaveClick={this.onSettingsSaveClick} onCancelClick={this.onCancelClick} room={this.state.room} />;
|
aux = <RoomSettings ref="room_settings" onSaveClick={this.onSettingsSaveClick} onCancelClick={this.onCancelClick} room={this.state.room} />;
|
||||||
} else if (this.state.uploadingRoomSettings) {
|
} else if (this.state.uploadingRoomSettings) {
|
||||||
|
|
|
@ -25,6 +25,7 @@ module.exports = React.createClass({
|
||||||
displayName: 'ForwardMessage',
|
displayName: 'ForwardMessage',
|
||||||
|
|
||||||
propTypes: {
|
propTypes: {
|
||||||
|
currentRoomId: React.PropTypes.string.isRequired,
|
||||||
content: React.PropTypes.object.isRequired,
|
content: React.PropTypes.object.isRequired,
|
||||||
|
|
||||||
// true if RightPanel is collapsed
|
// true if RightPanel is collapsed
|
||||||
|
@ -74,6 +75,7 @@ module.exports = React.createClass({
|
||||||
onAction: function(payload) {
|
onAction: function(payload) {
|
||||||
if (payload.action === 'view_room') {
|
if (payload.action === 'view_room') {
|
||||||
MatrixClientPeg.get().sendMessage(payload.room_id, this.props.content);
|
MatrixClientPeg.get().sendMessage(payload.room_id, this.props.content);
|
||||||
|
if (this.props.currentRoomId === payload.room_id) this.props.onCancelClick();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue