feat(ui): hotfix for chrome crashes

This commit is contained in:
nick-delirium 2024-04-24 11:19:22 +02:00
parent 4444ecf6e0
commit 49e35cb329
No known key found for this signature in database
GPG key ID: 93ABD695DF5FDBA0
2 changed files with 8 additions and 4 deletions

View file

@ -212,13 +212,12 @@ export default class MessageManager {
move(t: number): any {
// usually means waiting for messages from live session
if (Object.keys(this.tabs).length === 0) return;
this.tabCloseManager.moveReady(t).then(m => {
if (m) {
this.activeTabManager.moveReady(t).then(async (tabId) => {
const closeMessage = await this.tabCloseManager.moveReady(t)
if (closeMessage) {
const closedTabs = this.tabCloseManager.closedTabs
this.state.update({ closedTabs: Array.from(closedTabs) })
}
})
this.activeTabManager.moveReady(t).then((tabId) => {
// Moving mouse and setting :hover classes on ready view
this.mouseMoveManager.move(t);
const lastClick = this.clickManager.moveGetLast(t);

View file

@ -198,7 +198,12 @@ export default class WebPlayer extends Player {
}
changeTab = (tab: string) => {
const playing = this.wpState.get().playing
this.pause()
this.messageManager.changeTab(tab)
if (playing) {
this.play()
}
}
clean = () => {