fix: add Telegram header padding for Android fullscreen mode

This commit is contained in:
c0mrade
2026-02-01 21:09:16 +03:00
parent 6f8bc4fca5
commit 093c9f2893
2 changed files with 5 additions and 3 deletions

View File

@@ -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" className="glass fixed left-0 right-0 top-0 z-50 shadow-lg shadow-black/10 lg:hidden"
style={{ style={{
paddingTop: isFullscreen 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, : undefined,
}} }}
> >

View File

@@ -363,9 +363,11 @@ export function AppShell({ children }: AppShellProps) {
}; };
// Calculate header height based on fullscreen mode (only on mobile Telegram) // 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 const headerHeight = isMobileFullscreen
? 64 + Math.max(safeAreaInset.top, contentSafeAreaInset.top) + (platform === 'android' ? 0 : 45) ? 64 + Math.max(safeAreaInset.top, contentSafeAreaInset.top) + telegramHeaderHeight
: 64; : 64;
return ( return (