Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 41 additions & 5 deletions IceCubesApp/App/Tabs/Settings/SettingsTab.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ struct SettingsTabs: View {
appSection
accountsSection
generalSection
socialKeyboardSection
streamHomeTimelineSection
timelineFetchSection
otherSections
cacheSection
}
Expand Down Expand Up @@ -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)
Expand Down
Loading