diff --git a/frontend/app/components/Session_/Subheader.js b/frontend/app/components/Session_/Subheader.js index f2704bd62..d3a931088 100644 --- a/frontend/app/components/Session_/Subheader.js +++ b/frontend/app/components/Session_/Subheader.js @@ -23,13 +23,13 @@ function SubHeader(props) { const { width, height, - location: currentLocation, endTime, tabStates, currentTab, tabs, } = store.get(); + const currentLocation = tabStates[currentTab]?.location || '' const resourceList = tabStates[currentTab]?.resourceList || [] const exceptionsList = tabStates[currentTab]?.exceptionsList || [] const eventsList = tabStates[currentTab]?.eventsList || [] diff --git a/frontend/app/player/web/MessageManager.ts b/frontend/app/player/web/MessageManager.ts index 9df5c864f..03d35cc57 100644 --- a/frontend/app/player/web/MessageManager.ts +++ b/frontend/app/player/web/MessageManager.ts @@ -166,6 +166,11 @@ export default class MessageManager { this.screen.cursor.shake(); } + const activeTabs = this.state.get().tabs + if (tabId && !activeTabs.includes(tabId)) { + this.state.update({ tabs: activeTabs.concat(tabId) }) + } + if (tabId && this.activeTab !== tabId) { this.state.update({ currentTab: tabId }) this.activeTab = tabId @@ -210,7 +215,6 @@ export default class MessageManager { } switch (msg.tp) { case MType.TabChange: - this.state.update({ tabs: this.state.get().tabs.concat(msg.tabId) }) this.activeTabManager.append(msg) break; case MType.MouseThrashing: