Fix search recents on tvOS

This commit is contained in:
Arkadiusz Fal 2022-08-14 18:59:21 +02:00
parent 60a52bc12e
commit 117b00f7ee

View File

@ -311,7 +311,11 @@ struct SearchView: View {
Button { Button {
switch item.type { switch item.type {
case .query: case .query:
#if os(tvOS)
state.queryText = item.title
#else
queryText = item.title queryText = item.title
#endif
state.changeQuery { query in query.query = item.title } state.changeQuery { query in query.query = item.title }
updateFavoriteItem() updateFavoriteItem()
@ -351,6 +355,9 @@ struct SearchView: View {
.contextMenu { .contextMenu {
removeButton(item) removeButton(item)
removeAllButton removeAllButton
#if os(tvOS)
Button("Cancel", role: .cancel) {}
#endif
} }
} }