diff options
Diffstat (limited to 'Sora/Views/Settings/Section/SettingsSectionSearchView.swift')
| -rw-r--r-- | Sora/Views/Settings/Section/SettingsSectionSearchView.swift | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Sora/Views/Settings/Section/SettingsSectionSearchView.swift b/Sora/Views/Settings/Section/SettingsSectionSearchView.swift index 6249c4a..e82f872 100644 --- a/Sora/Views/Settings/Section/SettingsSectionSearchView.swift +++ b/Sora/Views/Settings/Section/SettingsSectionSearchView.swift @@ -1,16 +1,19 @@ import SwiftUI struct SettingsSectionSearchView: View { - @EnvironmentObject var settings: SettingsManager + @Environment(SettingsManager.self) + private var settings var body: some View { - Picker("Suggestion Mode", selection: $settings.searchSuggestionsMode) { + @Bindable var settings = settings + + Picker("Suggestions", selection: $settings.searchSuggestionsMode) { ForEach(SettingsSearchSuggestionsMode.allCases, id: \.self) { type in Text(type.rawValue.capitalized).tag(type) } } - Button("Clear History") { + Button("Clear Search History") { settings.searchHistory.removeAll() } .trailingFrame() |