Tree: Remove InlineHeader
Was a workaround for iOS 15. No longer required. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
parent
7bb4ed5f7c
commit
cfc4a74afe
16 changed files with 30 additions and 57 deletions
|
|
@ -136,7 +136,6 @@
|
|||
0CB0115B29D36D9E009AFEDE /* SearchResultsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CB0115A29D36D9E009AFEDE /* SearchResultsView.swift */; };
|
||||
0CB0AB5F29BD2A200015422C /* KodiServerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CB0AB5E29BD2A200015422C /* KodiServerView.swift */; };
|
||||
0CB6516528C5A5D700DCA721 /* InlinedList.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CB6516428C5A5D700DCA721 /* InlinedList.swift */; };
|
||||
0CB6516A28C5B4A600DCA721 /* InlineHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CB6516928C5B4A600DCA721 /* InlineHeader.swift */; };
|
||||
0CB725322C123E6F0047FC0B /* CloudDownloadView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CB725312C123E6F0047FC0B /* CloudDownloadView.swift */; };
|
||||
0CB725342C123E760047FC0B /* CloudMagnetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CB725332C123E760047FC0B /* CloudMagnetView.swift */; };
|
||||
0CBAB83628D12ED500AC903E /* DisableInteraction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CBAB83528D12ED500AC903E /* DisableInteraction.swift */; };
|
||||
|
|
@ -290,7 +289,6 @@
|
|||
0CB0115A29D36D9E009AFEDE /* SearchResultsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchResultsView.swift; sourceTree = "<group>"; };
|
||||
0CB0AB5E29BD2A200015422C /* KodiServerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KodiServerView.swift; sourceTree = "<group>"; };
|
||||
0CB6516428C5A5D700DCA721 /* InlinedList.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InlinedList.swift; sourceTree = "<group>"; };
|
||||
0CB6516928C5B4A600DCA721 /* InlineHeader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InlineHeader.swift; sourceTree = "<group>"; };
|
||||
0CB725312C123E6F0047FC0B /* CloudDownloadView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CloudDownloadView.swift; sourceTree = "<group>"; };
|
||||
0CB725332C123E760047FC0B /* CloudMagnetView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CloudMagnetView.swift; sourceTree = "<group>"; };
|
||||
0CBAB83528D12ED500AC903E /* DisableInteraction.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DisableInteraction.swift; sourceTree = "<group>"; };
|
||||
|
|
@ -583,7 +581,6 @@
|
|||
0C44E2A928D4DFC4007711AE /* Modifiers */,
|
||||
0CDCB91728C662640098B513 /* EmptyInstructionView.swift */,
|
||||
0CA3FB1F28B91D9500FA10A8 /* IndeterminateProgressView.swift */,
|
||||
0CB6516928C5B4A600DCA721 /* InlineHeader.swift */,
|
||||
0C32FB562890D1F2002BD219 /* ListRowViews.swift */,
|
||||
0C2D9652299316CC00A504B6 /* Tag.swift */,
|
||||
0C6771FB29B3E0DB005D38D2 /* HybridSecureField.swift */,
|
||||
|
|
@ -907,7 +904,6 @@
|
|||
0CA148DD288903F000DE2211 /* ScrapingViewModel.swift in Sources */,
|
||||
0C445C62293F9A0B0060744D /* Bundle.swift in Sources */,
|
||||
0C0755C6293424A200ECA142 /* DebridLabelView.swift in Sources */,
|
||||
0CB6516A28C5B4A600DCA721 /* InlineHeader.swift in Sources */,
|
||||
0CA148D8288903F000DE2211 /* ActionChoiceView.swift in Sources */,
|
||||
0C41BC6528C2AEB900B47DD6 /* SearchModels.swift in Sources */,
|
||||
0C68135028BC1A2D00FAD890 /* GithubWrapper.swift in Sources */,
|
||||
|
|
|
|||
|
|
@ -1,22 +0,0 @@
|
|||
//
|
||||
// InlineHeader.swift
|
||||
// Ferrite
|
||||
//
|
||||
// Created by Brian Dashore on 9/5/22.
|
||||
//
|
||||
// For iOS 15's weird defaults regarding sectioned list padding
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct InlineHeader: View {
|
||||
let title: String
|
||||
|
||||
init(_ title: String) {
|
||||
self.title = title
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
Text(title)
|
||||
}
|
||||
}
|
||||
|
|
@ -5,7 +5,6 @@
|
|||
// Created by Brian Dashore on 9/4/22.
|
||||
//
|
||||
// Removes the top padding on unsectioned lists
|
||||
// If a list is sectioned, see InlineHeader
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ struct HistorySectionView: View {
|
|||
|
||||
var body: some View {
|
||||
if compareGroup(historyGroup) > 0 {
|
||||
Section(header: InlineHeader(formatter.string(from: historyGroup[0].date ?? Date()))) {
|
||||
Section(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)
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ struct PluginInfoAboutView<P: Plugin>: View {
|
|||
@ObservedObject var selectedPlugin: P
|
||||
|
||||
var body: some View {
|
||||
Section(header: InlineHeader("Description")) {
|
||||
Section("Description") {
|
||||
VStack(alignment: .leading, spacing: 10) {
|
||||
if let pluginAbout = selectedPlugin.about {
|
||||
if pluginAbout.last == "\n" {
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ struct PluginInfoMetaView<P: Plugin>: View {
|
|||
) var pluginLists: FetchedResults<PluginList>
|
||||
|
||||
var body: some View {
|
||||
Section(header: InlineHeader("Metadata")) {
|
||||
Section("Metadata") {
|
||||
VStack(alignment: .leading) {
|
||||
VStack(alignment: .leading, spacing: 5) {
|
||||
HStack(spacing: 5) {
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ struct PluginAggregateView<P: Plugin, PJ: PluginJson>: View {
|
|||
searchText: searchText
|
||||
)
|
||||
if !filteredUpdatedPlugins.isEmpty {
|
||||
Section(header: InlineHeader("Updates")) {
|
||||
Section("Updates") {
|
||||
ForEach(filteredUpdatedPlugins, id: \.self) { (updatedPlugin: PJ) in
|
||||
PluginCatalogButtonView(availablePlugin: updatedPlugin, needsUpdate: true)
|
||||
}
|
||||
|
|
@ -47,7 +47,7 @@ struct PluginAggregateView<P: Plugin, PJ: PluginJson>: View {
|
|||
}
|
||||
|
||||
if !installedPlugins.isEmpty {
|
||||
Section(header: InlineHeader("Installed")) {
|
||||
Section("Installed") {
|
||||
ForEach(installedPlugins, id: \.self) { installedPlugin in
|
||||
InstalledPluginButtonView(
|
||||
installedPlugin: installedPlugin,
|
||||
|
|
@ -64,7 +64,7 @@ struct PluginAggregateView<P: Plugin, PJ: PluginJson>: View {
|
|||
searchText: searchText
|
||||
)
|
||||
if !filteredAvailablePlugins.isEmpty {
|
||||
Section(header: InlineHeader("Catalog")) {
|
||||
Section("Catalog") {
|
||||
ForEach(filteredAvailablePlugins, id: \.self) { availablePlugin in
|
||||
PluginCatalogButtonView(availablePlugin: availablePlugin, needsUpdate: false)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ struct SourceSettingsApiView: View {
|
|||
|
||||
var body: some View {
|
||||
Section(
|
||||
header: InlineHeader("API credentials"),
|
||||
header: Text("API credentials"),
|
||||
footer: Text("Grab the required API credentials from the website. A client secret can be an API token.")
|
||||
) {
|
||||
if let clientId = selectedSourceApi.clientId, clientId.dynamic {
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ struct SourceSettingsBaseUrlView: View {
|
|||
@State private var tempSite: String = ""
|
||||
var body: some View {
|
||||
Section(
|
||||
header: InlineHeader("Base URL"),
|
||||
header: Text("Base URL"),
|
||||
footer: Text("Enter the base URL of your server.")
|
||||
) {
|
||||
TextField("https://...", text: $tempSite, onEditingChanged: { isFocused in
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ struct SourceSettingsMethodView: View {
|
|||
@ObservedObject var selectedSource: Source
|
||||
|
||||
var body: some View {
|
||||
Section(header: InlineHeader("Fetch method")) {
|
||||
Section("Fetch method") {
|
||||
Picker("", selection: $selectedSource.preferredParser) {
|
||||
if selectedSource.jsonParser != nil {
|
||||
Text("Website API").tag(SourcePreferredParser.siteApi.rawValue)
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ struct KodiEditorView: View {
|
|||
Form {
|
||||
Group {
|
||||
Section(
|
||||
header: InlineHeader("URL"),
|
||||
header: Text("URL"),
|
||||
footer: Text("Must follow the format http(s)://<ip>:<port>")
|
||||
) {
|
||||
TextField("Enter URL", text: $serverUrl)
|
||||
|
|
@ -37,14 +37,14 @@ struct KodiEditorView: View {
|
|||
}
|
||||
|
||||
Section(
|
||||
header: InlineHeader("Friendly name"),
|
||||
header: Text("Friendly name"),
|
||||
footer: Text("Defaults to the URL if not provided")
|
||||
) {
|
||||
TextField("Friendly name", text: $friendlyName)
|
||||
}
|
||||
|
||||
Section(
|
||||
header: InlineHeader("Credentials"),
|
||||
header: Text("Credentials"),
|
||||
footer: Text("Only use for clients with authentication")
|
||||
) {
|
||||
TextField("Username", text: $username)
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ struct SettingsKodiView: View {
|
|||
|
||||
var body: some View {
|
||||
List {
|
||||
Section(header: InlineHeader("Description")) {
|
||||
Section("Description") {
|
||||
VStack(alignment: .leading, spacing: 10) {
|
||||
Text("Kodi is an external application that is used to manage a local media library and playback.")
|
||||
|
||||
|
|
@ -27,7 +27,7 @@ struct SettingsKodiView: View {
|
|||
}
|
||||
|
||||
Section(
|
||||
header: InlineHeader("Servers"),
|
||||
header: Text("Servers"),
|
||||
footer: Text("Edit a server by holding it and accessing the context menu")
|
||||
) {
|
||||
if kodiServers.isEmpty {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ struct SettingsAppVersionView: View {
|
|||
ProgressView()
|
||||
} else if !releases.isEmpty {
|
||||
List {
|
||||
Section(header: InlineHeader("GitHub links")) {
|
||||
Section("GitHub links") {
|
||||
ForEach(releases, id: \.self) { release in
|
||||
ListRowLinkView(text: release.tagName, link: release.htmlUrl)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ struct SettingsDebridInfoView: View {
|
|||
|
||||
var body: some View {
|
||||
List {
|
||||
Section(header: InlineHeader("Description")) {
|
||||
Section("Description") {
|
||||
VStack(alignment: .leading, spacing: 10) {
|
||||
Text(debridSource.description ??
|
||||
"\(debridSource.id) is a debrid service that is used for downloads and media playback. You must pay to access the service."
|
||||
|
|
@ -27,7 +27,7 @@ struct SettingsDebridInfoView: View {
|
|||
}
|
||||
|
||||
Section(
|
||||
header: InlineHeader("Login status"),
|
||||
header: Text("Login status"),
|
||||
footer: Text("A WebView will show up to prompt you for credentials")
|
||||
) {
|
||||
Button {
|
||||
|
|
@ -58,7 +58,7 @@ struct SettingsDebridInfoView: View {
|
|||
}
|
||||
|
||||
Section(
|
||||
header: InlineHeader("API key"),
|
||||
header: Text("API key"),
|
||||
footer: Text("Add a permanent API key here. Only use this if web authentication does not work!")
|
||||
) {
|
||||
HybridSecureField(
|
||||
|
|
|
|||
|
|
@ -44,13 +44,13 @@ struct SettingsView: View {
|
|||
var body: some View {
|
||||
NavigationStack {
|
||||
Form {
|
||||
Section(header: InlineHeader("Debrid services")) {
|
||||
Section("Debrid services") {
|
||||
ForEach(debridManager.debridSources, id: \.id) { (debridSource: DebridSource) in
|
||||
SettingsDebridLinkView(debridSource: debridSource)
|
||||
}
|
||||
}
|
||||
|
||||
Section(header: InlineHeader("Playback services")) {
|
||||
Section("Playback services") {
|
||||
NavigationLink {
|
||||
SettingsKodiView(kodiServers: kodiServers)
|
||||
} label: {
|
||||
|
|
@ -64,7 +64,7 @@ struct SettingsView: View {
|
|||
}
|
||||
|
||||
Section(
|
||||
header: InlineHeader("Behavior"),
|
||||
header: Text("Behavior"),
|
||||
footer: VStack(alignment: .leading, spacing: 8) {
|
||||
Text("Temporarily disable ephemeral auth if you cannot log into a service")
|
||||
Text("Only disable search timeout if results are slow to fetch")
|
||||
|
|
@ -111,13 +111,13 @@ struct SettingsView: View {
|
|||
}
|
||||
}
|
||||
|
||||
Section(header: InlineHeader("Plugin management")) {
|
||||
Section("Plugin management") {
|
||||
NavigationLink("Plugin lists") {
|
||||
SettingsPluginListView()
|
||||
}
|
||||
}
|
||||
|
||||
Section(header: InlineHeader("Default actions")) {
|
||||
Section("Default actions") {
|
||||
if !debridManager.enabledDebrids.isEmpty {
|
||||
NavigationLink {
|
||||
DefaultActionPickerView(
|
||||
|
|
@ -175,13 +175,13 @@ struct SettingsView: View {
|
|||
}
|
||||
}
|
||||
|
||||
Section(header: InlineHeader("Backups")) {
|
||||
Section("Backups") {
|
||||
NavigationLink("Backups") {
|
||||
BackupsView()
|
||||
}
|
||||
}
|
||||
|
||||
Section(header: InlineHeader("Updates")) {
|
||||
Section("Updates") {
|
||||
Toggle(isOn: $autoUpdateNotifs) {
|
||||
Text("Show update alerts")
|
||||
}
|
||||
|
|
@ -191,7 +191,7 @@ struct SettingsView: View {
|
|||
}
|
||||
}
|
||||
|
||||
Section(header: InlineHeader("Information")) {
|
||||
Section("Information") {
|
||||
ListRowLinkView(text: "Donate", link: "https://ko-fi.com/kingbri")
|
||||
ListRowLinkView(text: "Report issues", link: "https://github.com/bdashore3/Ferrite/issues")
|
||||
|
||||
|
|
@ -200,7 +200,7 @@ struct SettingsView: View {
|
|||
}
|
||||
}
|
||||
|
||||
Section(header: InlineHeader("Debug")) {
|
||||
Section("Debug") {
|
||||
NavigationLink("Logs") {
|
||||
SettingsLogView()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ struct ActionChoiceView: View {
|
|||
var body: some View {
|
||||
NavigationStack {
|
||||
Form {
|
||||
Section(header: InlineHeader("Now Playing")) {
|
||||
Section("Now Playing") {
|
||||
VStack(alignment: .leading, spacing: 5) {
|
||||
Text(navModel.selectedTitle)
|
||||
.font(.callout)
|
||||
|
|
@ -46,7 +46,7 @@ struct ActionChoiceView: View {
|
|||
}
|
||||
|
||||
if !debridManager.downloadUrl.isEmpty {
|
||||
Section(header: InlineHeader("Debrid options")) {
|
||||
Section("Debrid options") {
|
||||
ForEach(actions, id: \.id) { action in
|
||||
if action.requires.contains(ActionRequirement.debrid.rawValue) {
|
||||
ListRowButtonView(action.name, systemImage: "arrow.up.forward.app.fill") {
|
||||
|
|
@ -91,7 +91,7 @@ struct ActionChoiceView: View {
|
|||
}
|
||||
|
||||
if !navModel.resultFromCloud {
|
||||
Section(header: InlineHeader("Magnet options")) {
|
||||
Section("Magnet options") {
|
||||
ForEach(actions, id: \.id) { action in
|
||||
if action.requires.contains(ActionRequirement.magnet.rawValue) {
|
||||
ListRowButtonView(action.name, systemImage: "arrow.up.forward.app.fill") {
|
||||
|
|
|
|||
Loading…
Reference in a new issue