fix(web): show retry when Flutter loading fails #12
2 changed files with 12 additions and 1 deletions
|
|
@ -33,5 +33,12 @@
|
|||
|
||||
hesabixStartFlutter().catch(function (e) {
|
||||
console.error('[Hesabix] Flutter bootstrap failed:', e);
|
||||
var loaderUi = window.__hesabixLoaderUI;
|
||||
if (loaderUi && typeof loaderUi.markSlowLoad === 'function') {
|
||||
loaderUi.markSlowLoad();
|
||||
}
|
||||
if (loaderUi && typeof loaderUi.showRetry === 'function') {
|
||||
loaderUi.showRetry();
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
|
|
|||
|
|
@ -363,6 +363,7 @@
|
|||
setStatus: setStatus,
|
||||
setStatusKey: setStatusKey,
|
||||
markSlowLoad: markSlowLoad,
|
||||
showRetry: showRetry,
|
||||
hide: hideLoadingScreen,
|
||||
t: t,
|
||||
detectLocale: detectLocale,
|
||||
|
|
@ -400,7 +401,10 @@
|
|||
var screen = document.getElementById('flutter-loading-screen');
|
||||
if (screen && !screen.classList.contains('hidden') && !appReadySignaled) {
|
||||
console.warn('[Hesabix] Loader fallback timeout');
|
||||
hideLoadingScreen();
|
||||
// Flutter may still be compiling or initializing. Keep the loader visible
|
||||
// instead of exposing the intentionally empty web loading widget.
|
||||
markSlowLoad();
|
||||
showRetry();
|
||||
}
|
||||
}, 120000);
|
||||
})();
|
||||
|
|
|
|||
Loading…
Reference in a new issue