Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Always append the current room to the breadcrumbs
Browse files Browse the repository at this point in the history
  • Loading branch information
turt2live committed Mar 27, 2019
1 parent 64a6b47 commit bbbf509
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/components/views/rooms/RoomBreadcrumbs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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;
}
}

Expand Down

0 comments on commit bbbf509

Please sign in to comment.