fix(app): extract favicon sync and add freezeOnBlur to screens
This commit is contained in:
@@ -430,6 +430,7 @@ function ProvidersWrapper({ children }: { children: ReactNode }) {
|
|||||||
<VoiceProvider>
|
<VoiceProvider>
|
||||||
<OfferLinkListener upsertDaemonFromOfferUrl={upsertConnectionFromOfferUrl} />
|
<OfferLinkListener upsertDaemonFromOfferUrl={upsertConnectionFromOfferUrl} />
|
||||||
<HostSessionManager />
|
<HostSessionManager />
|
||||||
|
<FaviconStatusSync />
|
||||||
{children}
|
{children}
|
||||||
</VoiceProvider>
|
</VoiceProvider>
|
||||||
);
|
);
|
||||||
@@ -478,7 +479,6 @@ function OfferLinkListener({
|
|||||||
function AppWithSidebar({ children }: { children: ReactNode }) {
|
function AppWithSidebar({ children }: { children: ReactNode }) {
|
||||||
const pathname = usePathname();
|
const pathname = usePathname();
|
||||||
const params = useGlobalSearchParams<{ open?: string | string[] }>();
|
const params = useGlobalSearchParams<{ open?: string | string[] }>();
|
||||||
useFaviconStatus();
|
|
||||||
const activeServerId = useMemo(() => parseServerIdFromPathname(pathname), [pathname]);
|
const activeServerId = useMemo(() => parseServerIdFromPathname(pathname), [pathname]);
|
||||||
const shouldShowAppChrome = activeServerId !== null;
|
const shouldShowAppChrome = activeServerId !== null;
|
||||||
|
|
||||||
@@ -508,6 +508,11 @@ function AppWithSidebar({ children }: { children: ReactNode }) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function FaviconStatusSync() {
|
||||||
|
useFaviconStatus();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
function NavigationActiveWorkspaceObserver() {
|
function NavigationActiveWorkspaceObserver() {
|
||||||
const navigationRef = useNavigationContainerRef();
|
const navigationRef = useNavigationContainerRef();
|
||||||
|
|
||||||
@@ -608,10 +613,13 @@ export default function RootLayout() {
|
|||||||
>
|
>
|
||||||
<Stack.Screen name="index" />
|
<Stack.Screen name="index" />
|
||||||
<Stack.Screen name="settings" />
|
<Stack.Screen name="settings" />
|
||||||
<Stack.Screen name="h/[serverId]/workspace/[workspaceId]" />
|
<Stack.Screen
|
||||||
|
name="h/[serverId]/workspace/[workspaceId]"
|
||||||
|
options={{ freezeOnBlur: true }}
|
||||||
|
/>
|
||||||
<Stack.Screen
|
<Stack.Screen
|
||||||
name="h/[serverId]/agent/[agentId]"
|
name="h/[serverId]/agent/[agentId]"
|
||||||
options={{ gestureEnabled: false }}
|
options={{ gestureEnabled: false, freezeOnBlur: true }}
|
||||||
/>
|
/>
|
||||||
<Stack.Screen name="h/[serverId]/index" />
|
<Stack.Screen name="h/[serverId]/index" />
|
||||||
<Stack.Screen name="h/[serverId]/agents" />
|
<Stack.Screen name="h/[serverId]/agents" />
|
||||||
|
|||||||
Reference in New Issue
Block a user