diff --git a/frontend/app/components/Session/WebPlayer.tsx b/frontend/app/components/Session/WebPlayer.tsx index b7829acbb..f6a97121a 100644 --- a/frontend/app/components/Session/WebPlayer.tsx +++ b/frontend/app/components/Session/WebPlayer.tsx @@ -63,6 +63,9 @@ function WebPlayer(props: any) { }, []); useEffect(() => { + if (session.sessionId) { + sessionStore.setLastPlayedSessionId(session.sessionId); + } playerInst = undefined; if (!session.sessionId || contextValue.player !== undefined) return; const mobData = sessionStore.prefetchedMobUrls[session.sessionId] as diff --git a/frontend/app/mstore/sessionStore.ts b/frontend/app/mstore/sessionStore.ts index 64520085a..3c70fad1e 100644 --- a/frontend/app/mstore/sessionStore.ts +++ b/frontend/app/mstore/sessionStore.ts @@ -519,4 +519,8 @@ export default class SessionStore { this.total = 0; this.sessionIds = []; } + + setLastPlayedSessionId = (sessionId: string) => { + this.lastPlayedSessionId = sessionId; + } }