11import * as Linking from "expo-linking" ;
22import * as SplashScreen from "expo-splash-screen" ;
33import { useEffect } from "react" ;
4- import { StatusBar , View } from "react-native" ;
4+ import { StatusBar } from "react-native" ;
55import { GestureHandlerRootView } from "react-native-gesture-handler" ;
66import { KeyboardProvider } from "react-native-keyboard-controller" ;
77import { SafeAreaProvider } from "react-native-safe-area-context" ;
@@ -23,6 +23,8 @@ import { OverlayPortalHost } from "./components/OverlayPortal";
2323import { shouldHandleAppLink } from "./lib/appLinking" ;
2424import { useMobileNavigationTheme } from "./lib/useMobileNavigationTheme" ;
2525import { SubscriptionUsageCoordinator } from "./widgets/SubscriptionUsageCoordinator" ;
26+ import { VoiceInputProvider } from "./features/voice-input/VoiceInputProvider" ;
27+ import { GlobalVoiceInputControl } from "./features/voice-input/GlobalVoiceInputControl" ;
2628
2729import "../global.css" ;
2830
@@ -76,22 +78,24 @@ function AppContent() {
7678 < GestureHandlerRootView className = "flex-1" >
7779 < KeyboardProvider statusBarTranslucent >
7880 < SafeAreaProvider >
79- < StatusBar barStyle = { themeAppearance === "dark" ? "light-content" : "dark-content" } />
80- { /* The navigation theme drives the NATIVE header appearance: native-stack
81+ < VoiceInputProvider >
82+ < StatusBar barStyle = { themeAppearance === "dark" ? "light-content" : "dark-content" } />
83+ { /* The navigation theme drives the NATIVE header appearance: native-stack
8184 forwards `dark` as the nav bar's overrideUserInterfaceStyle. Without
8285 this, React Navigation defaults to its light theme and every native
8386 header (glass buttons, title, materials) is forced light even when
8487 the system is in dark mode. */ }
85- < View style = { { flex : 1 } } >
86- < IncomingShareProvider >
87- < Navigation linking = { appLinking } theme = { navigationTheme } />
88- </ IncomingShareProvider >
89- < ConfirmDialogHost />
90- < ThreadArrangementHost />
91- </ View >
92- { /* Anchored-menu overlays render here — in-window, so the
88+ < GlobalVoiceInputControl >
89+ < IncomingShareProvider >
90+ < Navigation linking = { appLinking } theme = { navigationTheme } />
91+ </ IncomingShareProvider >
92+ < ConfirmDialogHost />
93+ < ThreadArrangementHost />
94+ </ GlobalVoiceInputControl >
95+ { /* Anchored-menu overlays render here — in-window, so the
9396 keyboard stays up while a dropdown is open. */ }
94- < OverlayPortalHost />
97+ < OverlayPortalHost />
98+ </ VoiceInputProvider >
9599 </ SafeAreaProvider >
96100 </ KeyboardProvider >
97101 </ GestureHandlerRootView >
0 commit comments