Don't auto join rooms: always 'autoPeek' (ie. see if we can peek, otherwise offer to join)
This commit is contained in:
parent
4e4e5be9a1
commit
1cabe2ec37
2 changed files with 7 additions and 6 deletions
|
@ -66,7 +66,6 @@ module.exports = React.createClass({
|
|||
collapse_rhs: false,
|
||||
ready: false,
|
||||
width: 10000,
|
||||
autoPeek: true, // by default, we peek into rooms when we try to join them
|
||||
};
|
||||
if (s.logged_in) {
|
||||
if (MatrixClientPeg.get().getRooms().length) {
|
||||
|
@ -317,9 +316,6 @@ module.exports = React.createClass({
|
|||
});
|
||||
break;
|
||||
case 'view_room':
|
||||
// by default we autoPeek rooms, unless we were called explicitly with
|
||||
// autoPeek=false by something like RoomDirectory who has already peeked
|
||||
this.setState({ autoPeek : payload.auto_peek === false ? false : true });
|
||||
this._viewRoom(payload.room_id, payload.show_settings);
|
||||
break;
|
||||
case 'view_prev_room':
|
||||
|
@ -843,7 +839,6 @@ module.exports = React.createClass({
|
|||
<RoomView
|
||||
ref="roomView"
|
||||
roomId={this.state.currentRoom}
|
||||
autoPeek={this.state.autoPeek}
|
||||
key={this.state.currentRoom}
|
||||
ConferenceHandler={this.props.ConferenceHandler} />
|
||||
);
|
||||
|
|
|
@ -59,7 +59,13 @@ module.exports = React.createClass({
|
|||
propTypes: {
|
||||
ConferenceHandler: React.PropTypes.any,
|
||||
roomId: React.PropTypes.string,
|
||||
autoPeek: React.PropTypes.bool, // should we try to peek the room on mount, or has whoever invoked us already initiated a peek?
|
||||
autoPeek: React.PropTypes.bool, // Now unused, left here temporarily to avoid merge conflicts with @richvdh's branch.
|
||||
},
|
||||
|
||||
getDefaultProps: function() {
|
||||
return {
|
||||
autoPeek: true,
|
||||
}
|
||||
},
|
||||
|
||||
/* properties in RoomView objects include:
|
||||
|
|
Loading…
Reference in a new issue