Merge branch 'develop' into travis/persist-pinned-open

This commit is contained in:
Travis Ralston 2018-06-06 09:17:08 -06:00 committed by GitHub
commit 83f0459a7f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 1335 additions and 199 deletions

View file

@ -184,6 +184,7 @@ module.exports = React.createClass({
forwardingEvent: RoomViewStore.getForwardingEvent(),
shouldPeek: RoomViewStore.shouldPeek(),
showingPinned: SettingsStore.getValue("PinnedEvents.isOpen", RoomViewStore.getRoomId()),
editingRoomSettings: RoomViewStore.isEditingSettings(),
};
// Temporary logging to diagnose https://github.com/vector-im/riot-web/issues/4307
@ -1144,7 +1145,7 @@ module.exports = React.createClass({
},
onSettingsClick: function() {
this.showSettings(true);
dis.dispatch({ action: 'open_room_settings' });
},
onSettingsSaveClick: function() {
@ -1177,24 +1178,20 @@ module.exports = React.createClass({
});
// still editing room settings
} else {
this.setState({
editingRoomSettings: false,
});
dis.dispatch({ action: 'close_settings' });
}
}).finally(() => {
this.setState({
uploadingRoomSettings: false,
editingRoomSettings: false,
});
dis.dispatch({ action: 'close_settings' });
}).done();
},
onCancelClick: function() {
console.log("updateTint from onCancelClick");
this.updateTint();
this.setState({
editingRoomSettings: false,
});
dis.dispatch({ action: 'close_settings' });
if (this.state.forwardingEvent) {
dis.dispatch({
action: 'forward_event',
@ -1411,13 +1408,6 @@ module.exports = React.createClass({
});*/
},
showSettings: function(show) {
// XXX: this is a bit naughty; we should be doing this via props
if (show) {
this.setState({editingRoomSettings: true});
}
},
/**
* called by the parent component when PageUp/Down/etc is pressed.
*