diff --git a/src/components/views/rooms/RoomBreadcrumbs.js b/src/components/views/rooms/RoomBreadcrumbs.js index a45b8f257f..989e0a1305 100644 --- a/src/components/views/rooms/RoomBreadcrumbs.js +++ b/src/components/views/rooms/RoomBreadcrumbs.js @@ -88,11 +88,6 @@ export default class RoomBreadcrumbs extends React.Component { setTimeout(() => this.setState({rooms}), 0); } } - - const roomIds = rooms.map((r) => r.room.roomId); - if (roomIds.length > 0) { - SettingsStore.setValue("breadcrumb_rooms", null, SettingLevel.ACCOUNT, roomIds); - } } onAction(payload) { @@ -246,6 +241,11 @@ export default class RoomBreadcrumbs extends React.Component { if (this.refs.scroller) { this.refs.scroller.moveToOrigin(); } + + const roomIds = rooms.map((r) => r.room.roomId); + if (roomIds.length > 0) { + SettingsStore.setValue("breadcrumb_rooms", null, SettingLevel.ACCOUNT, roomIds); + } } _viewRoom(room, index) {