Always append the current room to the breadcrumbs

Fixes https://github.com/vector-im/riot-web/issues/8659
Fixes https://github.com/vector-im/riot-web/issues/8970
pull/21833/head
Travis Ralston 2019-03-27 15:38:42 -06:00
parent 64a6b47692
commit bbbf509a8c
1 changed files with 2 additions and 5 deletions

View File

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