@@ -11,6 +11,7 @@ import { AsyncResult, Atom } from "effect/reactivity";
1111import { useRef , useState } from "react" ;
1212import { FlatList , Platform , View , type TextInputInstance } from "react-native" ;
1313
14+ import { AndroidScreenHeader } from "../../components/ui/AndroidScreenHeader" ;
1415import { AppActivityIndicator } from "../../components/ui/AppActivityIndicator" ;
1516import { EmptyState } from "../../components/ui/EmptyState" ;
1617import { SearchField } from "../../components/ui/SearchField" ;
@@ -179,48 +180,12 @@ export function PullRequestFilterSearchScreen({
179180 }
180181 />
181182 ) ;
182- return (
183- < View className = "flex-1 bg-sheet" >
184- < SheetHeader
185- title = { kind === "labels" ? "Filter by label" : "Filter by author" }
186- onClose = { ( ) => navigation . goBack ( ) }
187- accessibilityLabel = { kind === "labels" ? "Close label filter" : "Close author filter" }
188- />
189- { Platform . OS === "ios" ? (
190- < >
191- < NativeStackScreenOptions
192- options = { {
193- unstable_headerToolbarItems : integratedSearch
194- ? ( ) => [
195- createNativeMailSearchToolbarItem ( {
196- placeholder,
197- onSearchTextChange : setQuery ,
198- showsSearchDismissButton : true ,
199- searchTextChangeId : "pr-filter-option-search" ,
200- } ) ,
201- ]
202- : undefined ,
203- headerSearchBarOptions : integratedSearch
204- ? undefined
205- : {
206- placeholder,
207- allowToolbarIntegration : true ,
208- autoCapitalize : "none" ,
209- hideNavigationBar : false ,
210- obscureBackground : false ,
211- onChangeText : ( event ) => setQuery ( event . nativeEvent . text ) ,
212- onCancelButtonPress : ( ) => setQuery ( "" ) ,
213- } ,
214- } }
215- />
216- { integratedSearch ? null : (
217- < Toolbar placement = "bottom" >
218- < Toolbar . SearchBarSlot />
219- </ Toolbar >
220- ) }
221- </ >
222- ) : (
223- < View className = "px-4 pb-3 pt-1" >
183+ const title = kind === "labels" ? "Filter by label" : "Filter by author" ;
184+ if ( Platform . OS === "android" ) {
185+ return (
186+ < View className = "flex-1 bg-sheet" collapsable = { false } >
187+ < AndroidScreenHeader title = { title } hideBottomBorder onBack = { ( ) => navigation . goBack ( ) } />
188+ < View className = "bg-header px-4 pb-3 pt-1" >
224189 < SearchField
225190 inputRef = { searchRef }
226191 accessibilityLabel = { placeholder }
@@ -232,6 +197,46 @@ export function PullRequestFilterSearchScreen({
232197 value = { query }
233198 />
234199 </ View >
200+ { list }
201+ </ View >
202+ ) ;
203+ }
204+ return (
205+ < View className = "flex-1 bg-sheet" >
206+ < SheetHeader
207+ title = { title }
208+ onClose = { ( ) => navigation . goBack ( ) }
209+ accessibilityLabel = { kind === "labels" ? "Close label filter" : "Close author filter" }
210+ />
211+ < NativeStackScreenOptions
212+ options = { {
213+ unstable_headerToolbarItems : integratedSearch
214+ ? ( ) => [
215+ createNativeMailSearchToolbarItem ( {
216+ placeholder,
217+ onSearchTextChange : setQuery ,
218+ showsSearchDismissButton : true ,
219+ searchTextChangeId : "pr-filter-option-search" ,
220+ } ) ,
221+ ]
222+ : undefined ,
223+ headerSearchBarOptions : integratedSearch
224+ ? undefined
225+ : {
226+ placeholder,
227+ allowToolbarIntegration : true ,
228+ autoCapitalize : "none" ,
229+ hideNavigationBar : false ,
230+ obscureBackground : false ,
231+ onChangeText : ( event ) => setQuery ( event . nativeEvent . text ) ,
232+ onCancelButtonPress : ( ) => setQuery ( "" ) ,
233+ } ,
234+ } }
235+ />
236+ { integratedSearch ? null : (
237+ < Toolbar placement = "bottom" >
238+ < Toolbar . SearchBarSlot />
239+ </ Toolbar >
235240 ) }
236241 { list }
237242 </ View >
0 commit comments