From 093c9f28935133cd300bf4c481d5c798011ecbfe Mon Sep 17 00:00:00 2001 From: c0mrade Date: Sun, 1 Feb 2026 21:09:16 +0300 Subject: [PATCH] fix: add Telegram header padding for Android fullscreen mode --- src/components/layout/AppShell/AppHeader.tsx | 2 +- src/components/layout/AppShell/AppShell.tsx | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/layout/AppShell/AppHeader.tsx b/src/components/layout/AppShell/AppHeader.tsx index 03c0edb..8a7f491 100644 --- a/src/components/layout/AppShell/AppHeader.tsx +++ b/src/components/layout/AppShell/AppHeader.tsx @@ -182,7 +182,7 @@ export function AppHeader({ className="glass fixed left-0 right-0 top-0 z-50 shadow-lg shadow-black/10 lg:hidden" style={{ paddingTop: isFullscreen - ? `${Math.max(safeAreaInset.top, contentSafeAreaInset.top) + (telegramPlatform === 'android' ? 0 : 45)}px` + ? `${Math.max(safeAreaInset.top, contentSafeAreaInset.top) + (telegramPlatform === 'android' ? 56 : 45)}px` : undefined, }} > diff --git a/src/components/layout/AppShell/AppShell.tsx b/src/components/layout/AppShell/AppShell.tsx index c87419d..b0625b5 100644 --- a/src/components/layout/AppShell/AppShell.tsx +++ b/src/components/layout/AppShell/AppShell.tsx @@ -363,9 +363,11 @@ export function AppShell({ children }: AppShellProps) { }; // Calculate header height based on fullscreen mode (only on mobile Telegram) - // On Android, don't add extra 45px padding as the native header is already accounted for + // On iOS: contentSafeAreaInset.top includes status bar + dynamic island + Telegram header + // On Android: safeAreaInset.top only includes status bar, need to add Telegram header height (~56px) + const telegramHeaderHeight = platform === 'android' ? 56 : 45; const headerHeight = isMobileFullscreen - ? 64 + Math.max(safeAreaInset.top, contentSafeAreaInset.top) + (platform === 'android' ? 0 : 45) + ? 64 + Math.max(safeAreaInset.top, contentSafeAreaInset.top) + telegramHeaderHeight : 64; return (