From 27606a9c943d99d7d109f70fdb11964af8277ada Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Tue, 30 Jun 2026 01:23:04 -0700 Subject: [PATCH] Use native iPad archive header search --- .../archive/ArchivedThreadsScreen.tsx | 34 ++++++++++++++----- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/apps/mobile/src/features/archive/ArchivedThreadsScreen.tsx b/apps/mobile/src/features/archive/ArchivedThreadsScreen.tsx index 2ef7e848dd..03b5bf834a 100644 --- a/apps/mobile/src/features/archive/ArchivedThreadsScreen.tsx +++ b/apps/mobile/src/features/archive/ArchivedThreadsScreen.tsx @@ -64,7 +64,8 @@ function ArchivedThreadsHeader(props: { }) { const { width } = useWindowDimensions(); const hasCustomFilter = props.selectedEnvironmentId !== null || props.sortOrder !== "newest"; - const usesNativeMailToolbar = Platform.OS === "ios" && width < 700; + const usesNativeChrome = Platform.OS === "ios"; + const usesCompactMailToolbar = Platform.OS === "ios" && width < 700; const archiveFilterMenu = { title: "Archived thread options", items: [ @@ -115,11 +116,11 @@ function ArchivedThreadsHeader(props: { [ { composeButtonId: "archived-refresh", @@ -138,14 +139,21 @@ function ArchivedThreadsHeader(props: { }, ] : undefined, - headerSearchBarOptions: usesNativeMailToolbar + headerSearchBarOptions: usesCompactMailToolbar ? undefined : { + ...(usesNativeChrome + ? { + allowToolbarIntegration: true, + placement: "integratedButton" as const, + } + : { + placement: "stacked" as const, + }), autoCapitalize: "none", hideNavigationBar: false, obscureBackground: false, placeholder: "Search archived threads", - placement: "stacked", onChangeText: (event) => { props.onSearchQueryChange(event.nativeEvent.text); }, @@ -156,8 +164,16 @@ function ArchivedThreadsHeader(props: { }} /> - {usesNativeMailToolbar ? null : ( + {usesCompactMailToolbar ? null : ( + {usesNativeChrome ? ( + + ) : null}