Merge pull request #4316 from matrix-org/t3chguy/room-tile-auto-scroll

Only auto-scroll to RoomTile when clicking on RoomTile or via shortcuts
This commit is contained in:
Michael Telatynski 2020-04-01 17:46:41 +01:00 committed by GitHub
commit 7143c91d16
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 2 deletions

View file

@ -289,6 +289,7 @@ export default createReactClass({
dis.dispatch({
action: 'view_room',
room_id: room.roomId,
show_room_tile: true, // to make sure the room gets scrolled into view
});
}
break;

View file

@ -203,7 +203,7 @@ export default createReactClass({
case 'view_room':
// when the room is selected make sure its tile is visible, for breadcrumbs/keyboard shortcut access
if (payload.room_id === this.props.room.roomId) {
if (payload.room_id === this.props.room.roomId && payload.show_room_tile) {
this._scrollIntoView();
}
break;