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,
|
collapse_rhs: false,
|
||||||
ready: false,
|
ready: false,
|
||||||
width: 10000,
|
width: 10000,
|
||||||
autoPeek: true, // by default, we peek into rooms when we try to join them
|
|
||||||
};
|
};
|
||||||
if (s.logged_in) {
|
if (s.logged_in) {
|
||||||
if (MatrixClientPeg.get().getRooms().length) {
|
if (MatrixClientPeg.get().getRooms().length) {
|
||||||
|
@ -317,9 +316,6 @@ module.exports = React.createClass({
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 'view_room':
|
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);
|
this._viewRoom(payload.room_id, payload.show_settings);
|
||||||
break;
|
break;
|
||||||
case 'view_prev_room':
|
case 'view_prev_room':
|
||||||
|
@ -843,7 +839,6 @@ module.exports = React.createClass({
|
||||||
<RoomView
|
<RoomView
|
||||||
ref="roomView"
|
ref="roomView"
|
||||||
roomId={this.state.currentRoom}
|
roomId={this.state.currentRoom}
|
||||||
autoPeek={this.state.autoPeek}
|
|
||||||
key={this.state.currentRoom}
|
key={this.state.currentRoom}
|
||||||
ConferenceHandler={this.props.ConferenceHandler} />
|
ConferenceHandler={this.props.ConferenceHandler} />
|
||||||
);
|
);
|
||||||
|
|
|
@ -59,7 +59,13 @@ module.exports = React.createClass({
|
||||||
propTypes: {
|
propTypes: {
|
||||||
ConferenceHandler: React.PropTypes.any,
|
ConferenceHandler: React.PropTypes.any,
|
||||||
roomId: React.PropTypes.string,
|
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:
|
/* properties in RoomView objects include:
|
||||||
|
|
Loading…
Reference in a new issue