From bad838c659dcae7566d5bb099bed255e5915d71e Mon Sep 17 00:00:00 2001 From: MrPiglr Date: Thu, 29 Jan 2026 17:42:30 -0700 Subject: [PATCH] modified: client/src/pages/os.tsx --- client/src/pages/os.tsx | 60 +++++++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 29 deletions(-) diff --git a/client/src/pages/os.tsx b/client/src/pages/os.tsx index 6899941..da0eca7 100644 --- a/client/src/pages/os.tsx +++ b/client/src/pages/os.tsx @@ -1184,39 +1184,41 @@ export default function AeThexOS() { const dragX = useMotionValue(0); const dragOpacity = useTransform(dragX, [-200, 0, 200], [0.5, 1, 0.5]); + // Hide system navigation bar on mount (Android only) - MUST be outside conditional + useEffect(() => { + if (!layout.isMobile) return; + + const setupStatusBar = async () => { + try { + // Hide the status bar for full immersion + await StatusBar.hide(); + + // Set navigation bar to transparent and hide it + if ((window as any).NavigationBar) { + await (window as any).NavigationBar.backgroundColorByHexString('#00000000', false); + await (window as any).NavigationBar.hide(); + } + + // Enable edge-to-edge mode + document.documentElement.style.setProperty('--safe-area-inset-bottom', 'env(safe-area-inset-bottom)'); + } catch (error) { + console.log('StatusBar not available on this platform'); + } + }; + + setupStatusBar(); + + return () => { + // Show status bar when leaving + StatusBar.show().catch(() => {}); + }; + }, [layout.isMobile]); + // Native Android App Layout if (layout.isMobile) { const activeWindows = windows.filter(w => !w.minimized); const currentWindow = activeWindows[activeWindows.length - 1]; - - // Hide system navigation bar on mount (Android only) - useEffect(() => { - const setupStatusBar = async () => { - try { - // Hide the status bar for full immersion - await StatusBar.hide(); - - // Set navigation bar to transparent and hide it - if ((window as any).NavigationBar) { - await (window as any).NavigationBar.backgroundColorByHexString('#00000000', false); - await (window as any).NavigationBar.hide(); - } - - // Enable edge-to-edge mode - document.documentElement.style.setProperty('--safe-area-inset-bottom', 'env(safe-area-inset-bottom)'); - } catch (error) { - console.log('StatusBar not available on this platform'); - } - }; - - setupStatusBar(); - - return () => { - // Show status bar when leaving - StatusBar.show().catch(() => {}); - }; - }, []); - + return (