Add setting for saving recents (fixes #14)

This commit is contained in:
Arkadiusz Fal
2021-12-01 12:22:19 +01:00
parent e61d1dfe2e
commit 06f7391ad9
5 changed files with 19 additions and 2 deletions

View File

@@ -24,6 +24,8 @@ struct SearchView: View {
@EnvironmentObject<RecentsModel> private var recents
@EnvironmentObject<SearchModel> private var state
@Default(.saveRecents) private var saveRecents
private var videos = [Video]()
var items: [ContentItem] {
@@ -229,7 +231,7 @@ struct SearchView: View {
}
private var showRecentQueries: Bool {
navigationStyle == .tab && state.queryText.isEmpty
navigationStyle == .tab && saveRecents && state.queryText.isEmpty
}
private var filtersActive: Bool {