feat(telegram): native SettingsButton opens our Settings screen
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Has been skipped
CI / integration (pull_request) Has been skipped
CI / ui (pull_request) Successful in 55s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m16s
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Has been skipped
CI / integration (pull_request) Has been skipped
CI / ui (pull_request) Successful in 55s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m16s
Inside the Mini App, reveal Telegram's native Settings button (Bot API 7.0) and route its taps to the Settings screen — the standard Mini App affordance. The in-app gear entry stays the primary path (two entry points by design). No-op outside Telegram or on a client predating the button.
This commit is contained in:
@@ -22,6 +22,7 @@ import {
|
||||
telegramContentSafeAreaTop,
|
||||
telegramSafeAreaInset,
|
||||
telegramDisableVerticalSwipes,
|
||||
telegramShowSettingsButton,
|
||||
telegramHaptic,
|
||||
telegramLaunch,
|
||||
type TelegramLaunch,
|
||||
@@ -647,6 +648,9 @@ export async function bootstrap(): Promise<void> {
|
||||
telegramOnEvent('fullscreenChanged', syncTelegramSafeArea);
|
||||
// Re-apply the theme live when the user switches Telegram's light/dark mode while the app is open.
|
||||
telegramOnEvent('themeChanged', () => syncTelegramTheme());
|
||||
// Telegram's native Settings button (Bot API 7.0) opens our Settings screen; the in-app gear
|
||||
// entry stays the primary path. No-op on clients predating the button.
|
||||
telegramShowSettingsButton(() => navigate('/settings'));
|
||||
await bootTelegram(launch);
|
||||
app.ready = true;
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user