diff options
| author | Fuwn <[email protected]> | 2025-02-25 00:02:22 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-02-25 00:02:22 -0800 |
| commit | 9b72faf4cdb95d2993a1de8f105a3703ff7f896c (patch) | |
| tree | 372ddfd4656920aca6bfb98b6ec970e7843e1462 /Sora/Views/Settings | |
| parent | feat: Development commit (diff) | |
| download | sora-testing-9b72faf4cdb95d2993a1de8f105a3703ff7f896c.tar.xz sora-testing-9b72faf4cdb95d2993a1de8f105a3703ff7f896c.zip | |
feat: Development commit
Diffstat (limited to 'Sora/Views/Settings')
| -rw-r--r-- | Sora/Views/Settings/Section/SettingsSearchView.swift | 7 | ||||
| -rw-r--r-- | Sora/Views/Settings/SettingsView.swift | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/Sora/Views/Settings/Section/SettingsSearchView.swift b/Sora/Views/Settings/Section/SettingsSearchView.swift index 63be2f1..644b02c 100644 --- a/Sora/Views/Settings/Section/SettingsSearchView.swift +++ b/Sora/Views/Settings/Section/SettingsSearchView.swift @@ -2,8 +2,15 @@ import SwiftUI struct SettingsSearchView: View { @EnvironmentObject var settings: Settings + @EnvironmentObject var manager: BooruManager var body: some View { Toggle("Suggest Search Tags", isOn: $settings.searchSuggestions) + + Button( + "Clear Cached Tags (\(manager.cacheSize ?? "Unknown size"))" + ) { + manager.clearCachedTags() + } } } diff --git a/Sora/Views/Settings/SettingsView.swift b/Sora/Views/Settings/SettingsView.swift index 02f9e34..a0eba01 100644 --- a/Sora/Views/Settings/SettingsView.swift +++ b/Sora/Views/Settings/SettingsView.swift @@ -43,4 +43,5 @@ struct SettingsView: View { #Preview { SettingsView() .environmentObject(Settings()) + .environmentObject(BooruManager(.yandere)) } |