mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-17 14:05:04 +08:00
Merge pull request #2838 from matrix-org/travis/breadcrumbs/current
Always append the current room to the breadcrumbs
This commit is contained in:
commit
1ae429f57b
@ -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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user