mirror of
https://github.com/Ferrite-iOS/Ferrite.git
synced 2026-01-11 20:10:27 +00:00
Tree: Switch to NavigationStack
Since minVersion is iOS 16, remove the compatability view. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
parent
f40f71bca3
commit
7bb4ed5f7c
12 changed files with 10 additions and 36 deletions
|
|
@ -112,7 +112,6 @@
|
|||
0CA148D6288903F000DE2211 /* SettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CA148BB288903F000DE2211 /* SettingsView.swift */; };
|
||||
0CA148D7288903F000DE2211 /* LoginWebView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CA148BC288903F000DE2211 /* LoginWebView.swift */; };
|
||||
0CA148D8288903F000DE2211 /* ActionChoiceView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CA148BD288903F000DE2211 /* ActionChoiceView.swift */; };
|
||||
0CA148DB288903F000DE2211 /* NavView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CA148C1288903F000DE2211 /* NavView.swift */; };
|
||||
0CA148DC288903F000DE2211 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0CA148C2288903F000DE2211 /* Assets.xcassets */; };
|
||||
0CA148DD288903F000DE2211 /* ScrapingViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CA148C3288903F000DE2211 /* ScrapingViewModel.swift */; };
|
||||
0CA148DF288903F000DE2211 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0CA148C6288903F000DE2211 /* Preview Assets.xcassets */; };
|
||||
|
|
@ -267,7 +266,6 @@
|
|||
0CA148BB288903F000DE2211 /* SettingsView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsView.swift; sourceTree = "<group>"; };
|
||||
0CA148BC288903F000DE2211 /* LoginWebView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoginWebView.swift; sourceTree = "<group>"; };
|
||||
0CA148BD288903F000DE2211 /* ActionChoiceView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ActionChoiceView.swift; sourceTree = "<group>"; };
|
||||
0CA148C1288903F000DE2211 /* NavView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NavView.swift; sourceTree = "<group>"; };
|
||||
0CA148C2288903F000DE2211 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
0CA148C3288903F000DE2211 /* ScrapingViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ScrapingViewModel.swift; sourceTree = "<group>"; };
|
||||
0CA148C6288903F000DE2211 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
|
||||
|
|
@ -584,7 +582,6 @@
|
|||
children = (
|
||||
0C44E2A928D4DFC4007711AE /* Modifiers */,
|
||||
0CDCB91728C662640098B513 /* EmptyInstructionView.swift */,
|
||||
0CA148C1288903F000DE2211 /* NavView.swift */,
|
||||
0CA3FB1F28B91D9500FA10A8 /* IndeterminateProgressView.swift */,
|
||||
0CB6516928C5B4A600DCA721 /* InlineHeader.swift */,
|
||||
0C32FB562890D1F2002BD219 /* ListRowViews.swift */,
|
||||
|
|
@ -857,7 +854,6 @@
|
|||
0C2D9653299316CC00A504B6 /* Tag.swift in Sources */,
|
||||
0C84FCE129E4B41D00B0DFE4 /* SourceFilterView.swift in Sources */,
|
||||
0CD5E78928CD932B001BF684 /* DisabledAppearance.swift in Sources */,
|
||||
0CA148DB288903F000DE2211 /* NavView.swift in Sources */,
|
||||
0CA3B23C28C2AA5600616D3A /* Bookmark+CoreDataClass.swift in Sources */,
|
||||
0CD4030A29DA01B6008D9F03 /* PluginInfoMetaView.swift in Sources */,
|
||||
0C750745289B003E004B3906 /* SourceRssParser+CoreDataProperties.swift in Sources */,
|
||||
|
|
|
|||
|
|
@ -1,21 +0,0 @@
|
|||
//
|
||||
// NavView.swift
|
||||
// Ferrite
|
||||
//
|
||||
// Created by Brian Dashore on 7/4/22.
|
||||
// Contributed by Mantton
|
||||
//
|
||||
// A wrapper that switches between NavigationStack and the legacy NavigationView
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct NavView<Content: View>: View {
|
||||
@ViewBuilder var content: Content
|
||||
|
||||
var body: some View {
|
||||
NavigationStack {
|
||||
content
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -13,7 +13,7 @@ struct PluginInfoView<P: Plugin>: View {
|
|||
@Binding var selectedPlugin: P?
|
||||
|
||||
var body: some View {
|
||||
NavView {
|
||||
NavigationStack {
|
||||
List {
|
||||
if let selectedPlugin {
|
||||
PluginInfoMetaView(selectedPlugin: selectedPlugin)
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ struct KodiEditorView: View {
|
|||
@State private var errorAlertText: String = ""
|
||||
|
||||
var body: some View {
|
||||
NavView {
|
||||
NavigationStack {
|
||||
Form {
|
||||
Group {
|
||||
Section(
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ struct PluginListEditorView: View {
|
|||
@State private var loadedSelectedList = false
|
||||
|
||||
var body: some View {
|
||||
NavView {
|
||||
NavigationStack {
|
||||
Form {
|
||||
TextField("Enter URL", text: $pluginListUrl)
|
||||
.disableAutocorrection(true)
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ struct ContentView: View {
|
|||
@State private var dismissAction: () -> Void = {}
|
||||
|
||||
var body: some View {
|
||||
NavView {
|
||||
NavigationStack {
|
||||
List {
|
||||
SearchResultsView(searchText: $searchText)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ struct LibraryView: View {
|
|||
@State private var searchText: String = ""
|
||||
|
||||
var body: some View {
|
||||
NavView {
|
||||
NavigationStack {
|
||||
ZStack {
|
||||
switch navModel.libraryPickerSelection {
|
||||
case .bookmarks:
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ struct LoginWebView: View {
|
|||
var url: URL
|
||||
|
||||
var body: some View {
|
||||
NavView {
|
||||
NavigationStack {
|
||||
WebView(url: url)
|
||||
.navigationTitle("Sign in")
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ struct PluginsView: View {
|
|||
@State private var searchText: String = ""
|
||||
|
||||
var body: some View {
|
||||
NavView {
|
||||
NavigationStack {
|
||||
ZStack {
|
||||
if checkedForPlugins {
|
||||
switch navModel.pluginPickerSelection {
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ struct SettingsView: View {
|
|||
@FocusState private var focusedField: Field?
|
||||
|
||||
var body: some View {
|
||||
NavView {
|
||||
NavigationStack {
|
||||
Form {
|
||||
Section(header: InlineHeader("Debrid services")) {
|
||||
ForEach(debridManager.debridSources, id: \.id) { (debridSource: DebridSource) in
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ struct ActionChoiceView: View {
|
|||
@State private var showMagnetCopyAlert = false
|
||||
|
||||
var body: some View {
|
||||
NavView {
|
||||
NavigationStack {
|
||||
Form {
|
||||
Section(header: InlineHeader("Now Playing")) {
|
||||
VStack(alignment: .leading, spacing: 5) {
|
||||
|
|
|
|||
|
|
@ -19,9 +19,8 @@ struct BatchChoiceView: View {
|
|||
|
||||
@State private var searchText: String = ""
|
||||
|
||||
// TODO: Make this generic for an IA protocol
|
||||
var body: some View {
|
||||
NavView {
|
||||
NavigationStack {
|
||||
List {
|
||||
ForEach(debridManager.selectedDebridItem?.files ?? [], id: \.self) { file in
|
||||
if file.name.lowercased().contains(searchText.lowercased()) || searchText.isEmpty {
|
||||
|
|
|
|||
Loading…
Reference in a new issue