Merge pull request #2838 from matrix-org/travis/breadcrumbs/current

Always append the current room to the breadcrumbs
This commit is contained in:
Travis Ralston 2019-03-28 05:05:48 -06:00 committed by GitHub
commit 1ae429f57b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,7 +29,6 @@ export default class RoomBreadcrumbs extends React.Component {
super(props);
this.state = {rooms: []};
this.onAction = this.onAction.bind(this);
this._previousRoomId = null;
this._dispatcherRef = null;
}
@ -55,10 +54,8 @@ export default class RoomBreadcrumbs extends React.Component {
onAction(payload) {
switch (payload.action) {
case 'view_room':
if (this._previousRoomId) {
this._appendRoomId(this._previousRoomId);
}
this._previousRoomId = payload.room_id;
this._appendRoomId(payload.room_id);
break;
}
}