Search history for tab navigation

This commit is contained in:
Arkadiusz Fal
2021-09-19 14:42:47 +02:00
parent ee1cb924c9
commit bede29dd51
8 changed files with 117 additions and 27 deletions

View File

@@ -79,6 +79,12 @@ struct RecentItem: Defaults.Serializable, Identifiable {
id = channel.id
title = channel.name
}
init(from query: String) {
type = .query
id = query
title = query
}
}
struct RecentItemBridge: Defaults.Bridge {

View File

@@ -6,6 +6,8 @@ final class SearchState: ObservableObject {
@Published var store = Store<[Video]>()
@Published var query = SearchQuery()
@Published var queryText = ""
@Published var querySuggestions = Store<[String]>()
private var previousResource: Resource?