diff --git a/web/src/main.ts b/web/src/main.ts index 1bfa6e3..788d0f4 100644 --- a/web/src/main.ts +++ b/web/src/main.ts @@ -29,6 +29,7 @@ import { createFollowController } from "./map/follow.ts"; import { createStatusStrip } from "./ui/strip.ts"; import { buildBootCard, buildDeniedCard, buildSignalLostCard, startGantry, stopGantry } from "./ui/cards.ts"; import { createProbe } from "./ui/probe.ts"; +import { telegramLocationSupported } from "./location/telegram.ts"; import { createRecenterControl } from "./ui/recenter.ts"; import { getWebApp } from "./telegram/webapp.ts"; import { watchTheme } from "./telegram/theme.ts"; @@ -109,7 +110,7 @@ async function boot(): Promise { const deniedCard = buildDeniedCard( locale, // Debug round 2/3: Telegram-only deep-link via LocationManager.openSettings. - { awaitingPin: false, withLocationSettings: wa?.LocationManager !== undefined }, + { awaitingPin: false, withLocationSettings: telegramLocationSupported(wa) }, ); const awaitingCard = buildDeniedCard( locale, @@ -117,7 +118,7 @@ async function boot(): Promise { // is the whole eligibility test — off-Telegram (Desktop/browser) there // is nothing for openSettings() to open, and navigator.geolocation // denial is handled by the OS settings hint copy instead. - { awaitingPin: true, withLocationSettings: wa?.LocationManager !== undefined }, + { awaitingPin: true, withLocationSettings: telegramLocationSupported(wa) }, ); const lostCard = buildSignalLostCard(locale); const gantryOf = (card: HTMLElement): HTMLElement => {