fix(ui): show last played session

This commit is contained in:
Shekar Siri 2024-10-11 16:42:16 +02:00
parent 2e4e428f57
commit 6b84ba2500
2 changed files with 7 additions and 0 deletions

View file

@ -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

View file

@ -519,4 +519,8 @@ export default class SessionStore {
this.total = 0;
this.sessionIds = [];
}
setLastPlayedSessionId = (sessionId: string) => {
this.lastPlayedSessionId = sessionId;
}
}