mirror of
https://github.com/yattee/yattee.git
synced 2026-07-19 22:02:10 +00:00
Use toolbar search placement on iPad channel view
The navigationBarDrawer search field on iPad added a resting scroll position above the banner on iOS 27, letting the view scroll past the banner top with the mirrored banner filling the gap. iPhone keeps the drawer placement since its header reserves space for the search bar.
This commit is contained in:
@@ -208,10 +208,16 @@ struct ChannelView: View {
|
||||
content()
|
||||
#if os(iOS)
|
||||
.if(supportsChannelSearch) { view in
|
||||
// iPhone: search bar drawer in the navigation area (header reserves
|
||||
// space for it). iPad: toolbar search button — the drawer would add
|
||||
// a resting scroll position above the banner, letting the view
|
||||
// scroll past the banner top.
|
||||
view.searchable(
|
||||
text: $searchText,
|
||||
isPresented: $isSearchActive,
|
||||
placement: .navigationBarDrawer(displayMode: .automatic),
|
||||
placement: horizontalSizeClass == .compact
|
||||
? .navigationBarDrawer(displayMode: .automatic)
|
||||
: .toolbar,
|
||||
prompt: Text("channel.search.placeholder")
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user