summaryrefslogtreecommitdiff
path: root/Sora/Views/Settings/Section/SettingsSectionSearchView.swift
blob: 6249c4a8b60a1e26f9b75b38e3004f0d9a95891b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import SwiftUI

struct SettingsSectionSearchView: View {
  @EnvironmentObject var settings: SettingsManager

  var body: some View {
    Picker("Suggestion Mode", selection: $settings.searchSuggestionsMode) {
      ForEach(SettingsSearchSuggestionsMode.allCases, id: \.self) { type in
        Text(type.rawValue.capitalized).tag(type)
      }
    }

    Button("Clear History") {
      settings.searchHistory.removeAll()
    }
    .trailingFrame()
  }
}