From 291aa0fe4606930b120fdf862414bb4ce44ce9c0 Mon Sep 17 00:00:00 2001 From: kingbri Date: Thu, 16 Feb 2023 18:52:29 -0500 Subject: [PATCH] Ferrite: Use InlineHeader in all sections Makes section presentation uniform across all iOS versions since iOS 15 defaults are wonky. Signed-off-by: kingbri --- .../Views/ComponentViews/Library/HistoryView.swift | 2 +- .../Views/ComponentViews/Plugin/PluginListView.swift | 2 +- Ferrite/Views/SettingsView.swift | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Ferrite/Views/ComponentViews/Library/HistoryView.swift b/Ferrite/Views/ComponentViews/Library/HistoryView.swift index 9567dcf..6c7d25c 100644 --- a/Ferrite/Views/ComponentViews/Library/HistoryView.swift +++ b/Ferrite/Views/ComponentViews/Library/HistoryView.swift @@ -71,7 +71,7 @@ struct HistorySectionView: View { var body: some View { if compareGroup(historyGroup) > 0 { - Section(header: Text(formatter.string(from: historyGroup[0].date ?? Date()))) { + Section(header: InlineHeader(formatter.string(from: historyGroup[0].date ?? Date()))) { ForEach(historyGroup, id: \.self) { history in ForEach(history.entryArray.filter { allEntries.contains($0) }, id: \.self) { entry in HistoryButtonView(entry: entry) diff --git a/Ferrite/Views/ComponentViews/Plugin/PluginListView.swift b/Ferrite/Views/ComponentViews/Plugin/PluginListView.swift index 5b18abb..cc8232d 100644 --- a/Ferrite/Views/ComponentViews/Plugin/PluginListView.swift +++ b/Ferrite/Views/ComponentViews/Plugin/PluginListView.swift @@ -57,7 +57,7 @@ struct PluginListView: View { } } } - .inlinedList(inset: Application.shared.osVersion.majorVersion > 14 ? 0 : -25) + .inlinedList(inset: 0) .listStyle(.insetGrouped) .sheet(isPresented: $navModel.showSourceSettings) { if String(describing: P.self) == "Source" { diff --git a/Ferrite/Views/SettingsView.swift b/Ferrite/Views/SettingsView.swift index ee4d521..edbdce0 100644 --- a/Ferrite/Views/SettingsView.swift +++ b/Ferrite/Views/SettingsView.swift @@ -78,17 +78,17 @@ struct SettingsView: View { } } - Section(header: Text("Behavior")) { + Section(header: InlineHeader("Behavior")) { Toggle(isOn: $autocorrectSearch) { Text("Autocorrect search") } } - Section(header: Text("Plugin management")) { + Section(header: InlineHeader("Plugin management")) { NavigationLink("Plugin lists", destination: SettingsPluginListView()) } - Section(header: Text("Default actions")) { + Section(header: InlineHeader("Default actions")) { if debridManager.enabledDebrids.count > 0 { NavigationLink( destination: DebridActionPickerView(), @@ -138,20 +138,20 @@ struct SettingsView: View { ) } - Section(header: Text("Backups")) { + Section(header: InlineHeader("Backups")) { NavigationLink(destination: BackupsView()) { Text("Backups") } } - Section(header: Text("Updates")) { + Section(header: InlineHeader("Updates")) { Toggle(isOn: $autoUpdateNotifs) { Text("Show update alerts") } NavigationLink("Version history", destination: SettingsAppVersionView()) } - Section(header: Text("Information")) { + Section(header: InlineHeader("Information")) { ListRowLinkView(text: "Donate", link: "https://ko-fi.com/kingbri") ListRowLinkView(text: "Report issues", link: "https://github.com/bdashore3/Ferrite/issues") NavigationLink("About", destination: AboutView())