fix: robust mobile suspend and auth recovery
This commit is contained in:
@ -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"
|
||||
|
||||
Reference in New Issue
Block a user