From bbbf509a8c360b33cac96df217318e53abff446f Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 27 Mar 2019 15:38:42 -0600 Subject: [PATCH] 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 --- src/components/views/rooms/RoomBreadcrumbs.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/components/views/rooms/RoomBreadcrumbs.js b/src/components/views/rooms/RoomBreadcrumbs.js index d661d439bf..6ea4b3e0ad 100644 --- a/src/components/views/rooms/RoomBreadcrumbs.js +++ b/src/components/views/rooms/RoomBreadcrumbs.js @@ -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; } }