import "@/lib/crypto-polyfill"; import { DarkTheme, DefaultTheme, ThemeProvider } from "expo-router/react-navigation"; import { Stack } from "expo-router/stack"; import { StatusBar } from "expo-status-bar"; import { Fragment } from "react"; import { Platform, useColorScheme } from "react-native"; import { GestureHandlerRootView } from "react-native-gesture-handler"; import { KeyboardProvider } from "react-native-keyboard-controller"; import { nativeStatusBar } from "@/lib/native-status-bar"; import { ClientProvider } from "@/lib/client"; import { ScreenSessionProvider } from "@/lib/screen-session"; import { AndroidAttentionSync } from "@/components/android-attention-sync"; import { IOSAttentionSync } from "@/components/ios-attention-sync"; import { LanDiscoverySync } from "@/components/lan-discovery-sync"; import { LiveActivityActionNavigation } from "@/components/live-activity-action-navigation"; import { NotificationActionSync } from "@/components/notification-action-sync"; import { ShortcutUrlHandler } from "@/components/shortcut-url-handler"; import { useLocale } from "@/lib/locale"; import { colors, palette } from "@/theme/colors"; import { radius } from "@/theme/type"; export const unstable_settings = { // Keep a home screen beneath Live Activity deep links, including cold launches. anchor: "(tabs)", }; const light = { ...DefaultTheme, colors: { ...DefaultTheme.colors, primary: palette.light.accent, background: "#f2f2f7" } }; const dark = { ...DarkTheme, colors: { ...DarkTheme.colors, primary: palette.dark.accent, background: "#000000" } }; // Sheets hold forms and lists, so they get the app's solid grouped background: // iOS's glass material would show the page behind through every field. export default function RootLayout() { const scheme = useColorScheme(); const { t, pick } = useLocale(); const sheetContent = { backgroundColor: colors.sheet }; return ( {Platform.OS === "ios" ? : null} {Platform.OS === "ios" ? : null} {Platform.OS === "android" ? : null} {/* Android's literal theme colors must reach memoized rows and native views too; rebuild the tree when the system appearance changes. */} {!nativeStatusBar ? : null} {/* Its title is what a pushed page's back button says to VoiceOver: not the group's "(tabs)". */} ); }