From bf00c7e8a6131fae404a215fe21219316918f763 Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Sat, 27 Jun 2026 12:30:36 -0700 Subject: [PATCH] Fix sidebar selection and file return --- apps/mobile/src/features/files/ThreadFilesRouteScreen.tsx | 4 ---- apps/mobile/src/features/threads/ThreadNavigationSidebar.tsx | 3 ++- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/apps/mobile/src/features/files/ThreadFilesRouteScreen.tsx b/apps/mobile/src/features/files/ThreadFilesRouteScreen.tsx index 75c71775bb..5d532de6f6 100644 --- a/apps/mobile/src/features/files/ThreadFilesRouteScreen.tsx +++ b/apps/mobile/src/features/files/ThreadFilesRouteScreen.tsx @@ -727,10 +727,6 @@ export function ThreadFileScreen() { accessibilityLabel="Return to chat" icon="chevron.left" onPress={() => { - if (router.canGoBack()) { - router.back(); - return; - } router.replace(buildThreadRoutePath({ environmentId, threadId })); }} /> diff --git a/apps/mobile/src/features/threads/ThreadNavigationSidebar.tsx b/apps/mobile/src/features/threads/ThreadNavigationSidebar.tsx index ee4b551450..099c3ae7d8 100644 --- a/apps/mobile/src/features/threads/ThreadNavigationSidebar.tsx +++ b/apps/mobile/src/features/threads/ThreadNavigationSidebar.tsx @@ -399,6 +399,7 @@ export function ThreadNavigationSidebar(props: { const selectedMutedColor = IOS_SELECTED_MUTED_FOREGROUND; const pressedBackgroundColor = useThemeColor("--color-subtle"); const listThemeKey = `${colorScheme}:${String(backgroundColor)}:${String(selectedBackgroundColor)}`; + const listExtraData = `${listThemeKey}:${props.selectedThreadKey ?? ""}`; const headerFadeColor = String(backgroundColor); const topListInset = insets.top + SIDEBAR_STICKY_HEADER_HEIGHT - 6; const handleSwipeableWillOpen = useCallback((methods: SwipeableMethods) => { @@ -517,7 +518,7 @@ export function ThreadNavigationSidebar(props: { item.kind} keyExtractor={(item) => item.key} renderItem={renderListItem}