fix: robust mobile suspend and auth recovery

This commit is contained in:
2026-03-04 00:51:32 -05:00
parent bdfcd55370
commit 90bb93be17
11 changed files with 257 additions and 47 deletions

View File

@ -20,12 +20,25 @@ const englishOnly = ref(false)
onMounted(async () => {
analyticsService.logEvent({ event_name: 'screen_view', screen_name: 'Transport' })
window.addEventListener('app-refocus', handleRefocus)
await Promise.all([
routeStore.loadRoutes(),
taxiStore.loadTaxis()
])
})
function handleRefocus() {
Promise.all([
routeStore.loadRoutes(undefined, false, true),
taxiStore.loadTaxis(undefined, true)
])
}
import { onUnmounted } from 'vue'
onUnmounted(() => {
window.removeEventListener('app-refocus', handleRefocus)
})
const handleBusSearch = async () => {
await routeStore.loadRoutes({
originCity: originSearch.value,
@ -237,7 +250,7 @@ const correlimientos = computed(() => {
</div>
</div>
<div class="text-right flex flex-col items-end gap-2">
<p class="font-black text-xl text-primary">{{ taxi.shift }}</p>
<p class="font-black text-xl text-primary">{{ taxi.shifts?.[0] || 'Día' }}</p>
<FavoriteButton
item-type="taxi"
:item-id="taxi.id"