diff --git a/IceCubesApp/App/Tabs/Settings/SettingsTab.swift b/IceCubesApp/App/Tabs/Settings/SettingsTab.swift index 246514494..e736bc394 100644 --- a/IceCubesApp/App/Tabs/Settings/SettingsTab.swift +++ b/IceCubesApp/App/Tabs/Settings/SettingsTab.swift @@ -38,6 +38,9 @@ struct SettingsTabs: View { appSection accountsSection generalSection + socialKeyboardSection + streamHomeTimelineSection + timelineFetchSection otherSections cacheSection } @@ -228,22 +231,55 @@ struct SettingsTabs: View { } .disabled(preferences.preferredBrowser != PreferredBrowser.inAppSafari) #endif - Toggle(isOn: $preferences.isSocialKeyboardEnabled) { - Label("settings.other.social-keyboard", systemImage: "keyboard") - } Toggle(isOn: $preferences.soundEffectEnabled) { Label("settings.other.sound-effect", systemImage: "hifispeaker") } + } header: { + Text("settings.section.other") + } + #if !os(visionOS) + .listRowBackground(theme.primaryBackgroundColor) + #endif + } + + private var socialKeyboardSection: some View { + @Bindable var preferences = preferences + return Section { + Toggle(isOn: $preferences.isSocialKeyboardEnabled) { + Label("settings.other.social-keyboard", systemImage: "keyboard") + } + } footer: { + Text("Adds @ and # keys directly on the keyboard for faster mentions and hashtags.") + } + #if !os(visionOS) + .listRowBackground(theme.primaryBackgroundColor) + #endif + } + + private var streamHomeTimelineSection: some View { + @Bindable var preferences = preferences + return Section { Toggle(isOn: $preferences.streamHomeTimeline) { Label("Stream home timeline", systemImage: "antenna.radiowaves.left.and.right") .symbolVariant(preferences.streamHomeTimeline ? .none : .slash) } + } footer: { + Text("Keeps your home timeline up to date in real time using streaming when available. Disable in case of performance issues.") + } + #if !os(visionOS) + .listRowBackground(theme.primaryBackgroundColor) + #endif + } + + private var timelineFetchSection: some View { + @Bindable var preferences = preferences + return Section { Toggle(isOn: $preferences.fullTimelineFetch) { Label("Full timeline fetch", systemImage: "arrow.triangle.2.circlepath") .symbolVariant(preferences.fullTimelineFetch ? .none : .slash) } - } header: { - Text("settings.section.other") + } footer: { + Text("Fetches all new timeline posts (up to 800) instead of only the latest 40 + manually loading the gap.") } #if !os(visionOS) .listRowBackground(theme.primaryBackgroundColor)