From 08c62c1125858e349aa63f26587afe9a3fabea95 Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Sun, 14 Aug 2022 18:59:21 +0200 Subject: [PATCH] Fix search recents on tvOS --- Shared/Search/SearchView.swift | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Shared/Search/SearchView.swift b/Shared/Search/SearchView.swift index 7070bdc3..c60bf577 100644 --- a/Shared/Search/SearchView.swift +++ b/Shared/Search/SearchView.swift @@ -311,7 +311,11 @@ struct SearchView: View { Button { switch item.type { case .query: - queryText = item.title + #if os(tvOS) + state.queryText = item.title + #else + queryText = item.title + #endif state.changeQuery { query in query.query = item.title } updateFavoriteItem() @@ -351,6 +355,9 @@ struct SearchView: View { .contextMenu { removeButton(item) removeAllButton + #if os(tvOS) + Button("Cancel", role: .cancel) {} + #endif } }