fix gameLoaded
This commit is contained in:
parent
043e28ed97
commit
d112b01177
2 changed files with 6 additions and 2 deletions
|
|
@ -63,7 +63,7 @@
|
|||
|
||||
if (window.navigator.maxTouchPoints > 1) window.location.hash = '#dev' // show eruda
|
||||
// unregister all sw
|
||||
if (window.navigator.serviceWorker) {
|
||||
if (window.navigator.serviceWorker && document.querySelector('.initial-loader').style.opacity !== 0) {
|
||||
console.log('got worker')
|
||||
window.navigator.serviceWorker.getRegistrations().then(registrations => {
|
||||
registrations.forEach(registration => {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
import { resetStateAfterDisconnect } from './browserfs'
|
||||
import { hideModal, activeModalStack, showModal, miscUiState } from './globalState'
|
||||
import { appStatusState, resetAppStatusState } from './react/AppStatusProvider'
|
||||
|
||||
|
|
@ -25,7 +26,6 @@ export const setLoadingScreenStatus = function (status: string | undefined | nul
|
|||
}
|
||||
showModal({ reactType: 'app-status' })
|
||||
if (appStatusState.isError) {
|
||||
miscUiState.gameLoaded = false
|
||||
return
|
||||
}
|
||||
appStatusState.hideDots = hideDots
|
||||
|
|
@ -33,5 +33,9 @@ export const setLoadingScreenStatus = function (status: string | undefined | nul
|
|||
appStatusState.lastStatus = isError ? appStatusState.status : ''
|
||||
appStatusState.status = status
|
||||
appStatusState.minecraftJsonMessage = minecraftJsonMessage ?? null
|
||||
|
||||
if (isError && miscUiState.gameLoaded) {
|
||||
resetStateAfterDisconnect()
|
||||
}
|
||||
}
|
||||
globalThis.setLoadingScreenStatus = setLoadingScreenStatus
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue