summaryrefslogtreecommitdiff
path: root/Sora/Views
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-02-23 09:51:09 -0800
committerFuwn <[email protected]>2026-02-23 13:33:42 -0800
commit33cbce7af9dd26e40e9dd6ba825499eff9abd707 (patch)
tree2a5ab11e3e3c1cbd74bf0634970fcf6e817be0b4 /Sora/Views
parentchore: add login localization key (diff)
downloadsora-testing-33cbce7af9dd26e40e9dd6ba825499eff9abd707.tar.xz
sora-testing-33cbce7af9dd26e40e9dd6ba825499eff9abd707.zip
feat: add moebooru held-post visibility setting
Diffstat (limited to 'Sora/Views')
-rw-r--r--Sora/Views/MainView.swift7
-rw-r--r--Sora/Views/Settings/Section/SettingsSectionProviderView.swift4
2 files changed, 9 insertions, 2 deletions
diff --git a/Sora/Views/MainView.swift b/Sora/Views/MainView.swift
index aa89aa3..770d424 100644
--- a/Sora/Views/MainView.swift
+++ b/Sora/Views/MainView.swift
@@ -19,6 +19,7 @@ struct MainView: View {
}
.onAppear(perform: initializeManager)
.onChange(of: settings.providerCredentials) { initializeManager() }
+ .onChange(of: settings.showHeldMoebooruPosts) { initializeManager() }
#if os(macOS)
.onChange(of: selectedTab) { _, newValue in
if newValue == 0 {
@@ -119,7 +120,8 @@ struct MainView: View {
manager = BooruManager(
provider,
credentials: settings.providerCredentials
- .first { $0.provider == settings.preferredBooru }
+ .first { $0.provider == settings.preferredBooru },
+ showHeldMoebooruPosts: settings.showHeldMoebooruPosts
)
manager.searchText = previousSearchText
@@ -136,7 +138,8 @@ struct MainView: View {
manager = BooruManager(
settings.preferredBooru,
credentials: settings.providerCredentials
- .first { $0.provider == settings.preferredBooru }
+ .first { $0.provider == settings.preferredBooru },
+ showHeldMoebooruPosts: settings.showHeldMoebooruPosts
)
Task(priority: .userInitiated) {
diff --git a/Sora/Views/Settings/Section/SettingsSectionProviderView.swift b/Sora/Views/Settings/Section/SettingsSectionProviderView.swift
index 172ddc6..9ba7610 100644
--- a/Sora/Views/Settings/Section/SettingsSectionProviderView.swift
+++ b/Sora/Views/Settings/Section/SettingsSectionProviderView.swift
@@ -22,6 +22,10 @@ struct SettingsSectionProviderView: View {
}
}
+ Section(header: Text("Moebooru Feed")) {
+ Toggle("Show Held Posts", isOn: $settings.showHeldMoebooruPosts)
+ }
+
Section(header: Text("API Credentials")) {
SecureField(
"API Key",