fix: resolve blank screen on return from external links
This commit is contained in:
@ -26,12 +26,25 @@ export const useShuttleStore = defineStore('shuttle', () => {
|
||||
}
|
||||
}
|
||||
|
||||
// Recarga silenciosa: no activa el spinner (para refocus desde background)
|
||||
async function silentReload() {
|
||||
if (shuttles.value.length === 0) { return loadShuttles() }
|
||||
error.value = null
|
||||
try {
|
||||
shuttles.value = await shuttlesService.getAllShuttles(filters.value)
|
||||
} catch (e) {
|
||||
console.error('Error silent-reloading shuttles:', e)
|
||||
// No mostrar error si ya hay datos
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
shuttles,
|
||||
isLoading,
|
||||
error,
|
||||
filters,
|
||||
loadShuttles,
|
||||
silentReload,
|
||||
}
|
||||
}, {
|
||||
persist: {
|
||||
|
||||
Reference in New Issue
Block a user