1- import { PermissionUpdateNotice } from "./features/connection/PermissionUpdateNotice " ;
1+ import { installPermissionUpdateNotice } from "./features/connection/permissionUpdateNotice " ;
22import * as Linking from "expo-linking" ;
33import * as SplashScreen from "expo-splash-screen" ;
44import { useEffect } from "react" ;
@@ -31,6 +31,12 @@ import { environmentThreadShells } from "./state/threads";
3131import { environmentShell } from "./state/shell" ;
3232import { OverlayPortalHost } from "./components/ui/OverlayPortal" ;
3333import { shouldHandleAppLink , restoreDraftLinkState } from "./lib/appLinking" ;
34+ import { hasCloudPublicConfig } from "./features/cloud/publicConfig" ;
35+ import { takeScheduledTaskNewLink } from "./features/settings/scheduled-task-editor-state" ;
36+ import {
37+ disposeOnFoundationReplace ,
38+ type FoundationHotModule ,
39+ } from "./lib/foundation-fast-refresh" ;
3440import { useMobileNavigationTheme } from "./lib/useMobileNavigationTheme" ;
3541import { useUiRuntimeMemoryWarningGc } from "./lib/useUiRuntimeMemoryWarningGc" ;
3642import { SubscriptionUsageCoordinator } from "./widgets/SubscriptionUsageCoordinator" ;
@@ -58,7 +64,7 @@ void hydrateWorkspaceSelections();
5864const appLinking = {
5965 prefixes : [ Linking . createURL ( "/" ) , "t3code://" , "t3code-dev://" , "t3code-preview://" ] ,
6066 config : { initialRouteName : "Home" } ,
61- filter : shouldHandleAppLink ,
67+ filter : ( url : string ) => shouldHandleAppLink ( url , hasCloudPublicConfig ( ) ) ,
6268 getInitialURL : async ( ) => ( await Linking . getInitialURL ( ) ) ?? ( await launchWorkspaceURL ( ) ) ,
6369 getActionFromState : (
6470 state : Parameters < typeof getActionFromState > [ 0 ] ,
@@ -68,15 +74,25 @@ const appLinking = {
6874 ( workspaceDetailLinkAction ( state ) as ReturnType < typeof getActionFromState > ) ??
6975 getActionFromState ( state , options ) ,
7076 getStateFromPath : ( path : string , options : Parameters < typeof getStateFromPath > [ 1 ] ) =>
71- restoreSettingsLinkState (
72- restoreDraftLinkState ( getStateFromPath ( path , options ) , path ) ,
73- settingsLinkPage ( ) ,
77+ takeScheduledTaskNewLink (
78+ restoreSettingsLinkState (
79+ restoreDraftLinkState ( getStateFromPath ( path , options ) , path ) ,
80+ settingsLinkPage ( ) ,
81+ ) ,
7482 ) ,
7583} ;
7684
7785const Navigation = createStaticNavigation ( RootStack ) ;
7886const navigationRef = createNavigationContainerRef ( ) ;
7987
88+ declare const module : { readonly hot ?: FoundationHotModule } | undefined ;
89+
90+ const disposePermissionUpdateNotice = installPermissionUpdateNotice ( ) ;
91+ disposeOnFoundationReplace (
92+ typeof module === "undefined" ? undefined : module . hot ,
93+ disposePermissionUpdateNotice ,
94+ ) ;
95+
8096function SplashScreenCoordinator ( ) {
8197 const { isReady } = useAppearancePreferences ( ) ;
8298
@@ -119,7 +135,6 @@ function AppContent() {
119135 < >
120136 < SplashScreenCoordinator />
121137 < SubscriptionUsageCoordinator />
122- < PermissionUpdateNotice />
123138 < GestureHandlerRootView className = "flex-1" >
124139 < KeyboardProvider statusBarTranslucent >
125140 < SafeAreaProvider >
0 commit comments