diff --git a/Fyreplace.xcodeproj/project.pbxproj b/Fyreplace.xcodeproj/project.pbxproj index 5ec3ce6..75e8884 100644 --- a/Fyreplace.xcodeproj/project.pbxproj +++ b/Fyreplace.xcodeproj/project.pbxproj @@ -255,7 +255,6 @@ 4DCE062C2C08E65300F69AF1 /* RegularNavigation.swift */, 4D5251F42C10A9F100018CD2 /* DynamicNavigation.swift */, 4D5251EB2C1097A600018CD2 /* Destination.swift */, - 4D5251F22C109FAC00018CD2 /* Label+Destination.swift */, ); path = Navigation; sourceTree = ""; @@ -395,6 +394,7 @@ 4D9B3B442C36F46F00A8F7AD /* NSTextContentType.swift */, 4D9B3B462C36F50300A8F7AD /* UITextContentType.swift */, 4DE785872C88F392000EC4E5 /* HTTPField.swift */, + 4D5251F22C109FAC00018CD2 /* Label+Destination.swift */, ); path = Extensions; sourceTree = ""; diff --git a/Fyreplace/Views/Navigation/Label+Destination.swift b/Fyreplace/Extensions/Label+Destination.swift similarity index 100% rename from Fyreplace/Views/Navigation/Label+Destination.swift rename to Fyreplace/Extensions/Label+Destination.swift diff --git a/Fyreplace/Views/MainView.swift b/Fyreplace/Views/MainView.swift index 070a8d0..8de3b00 100644 --- a/Fyreplace/Views/MainView.swift +++ b/Fyreplace/Views/MainView.swift @@ -1,6 +1,6 @@ import SwiftUI -struct MainView: View, MainViewProtocol { +struct MainView: MainViewProtocol { @State var showError = false diff --git a/Fyreplace/Views/Screens/AuthenticatingScreen.swift b/Fyreplace/Views/Screens/AuthenticatingScreen.swift index 4f3c2e0..b321480 100644 --- a/Fyreplace/Views/Screens/AuthenticatingScreen.swift +++ b/Fyreplace/Views/Screens/AuthenticatingScreen.swift @@ -15,7 +15,7 @@ struct AuthenticatingScreen: View where Content: View { init(isRegistering: Bool, content: @escaping () -> Content) { self.content = content - choice = isRegistering ? .register : .login + self.choice = isRegistering ? .register: .login } var body: some View { diff --git a/Fyreplace/Views/Screens/LoginScreen.swift b/Fyreplace/Views/Screens/LoginScreen.swift index 6300190..16b6d8d 100644 --- a/Fyreplace/Views/Screens/LoginScreen.swift +++ b/Fyreplace/Views/Screens/LoginScreen.swift @@ -1,6 +1,6 @@ import SwiftUI -struct LoginScreen: View, LoginScreenProtocol { +struct LoginScreen: LoginScreenProtocol { let namespace: Namespace.ID @EnvironmentObject diff --git a/Fyreplace/Views/Screens/RegisterScreen.swift b/Fyreplace/Views/Screens/RegisterScreen.swift index eebf425..d41c7f6 100644 --- a/Fyreplace/Views/Screens/RegisterScreen.swift +++ b/Fyreplace/Views/Screens/RegisterScreen.swift @@ -1,6 +1,6 @@ import SwiftUI -struct RegisterScreen: View, RegisterScreenProtocol { +struct RegisterScreen: RegisterScreenProtocol { let namespace: Namespace.ID @EnvironmentObject diff --git a/Fyreplace/Views/Screens/SettingsScreen.swift b/Fyreplace/Views/Screens/SettingsScreen.swift index e4a6ef6..a651cd2 100644 --- a/Fyreplace/Views/Screens/SettingsScreen.swift +++ b/Fyreplace/Views/Screens/SettingsScreen.swift @@ -1,12 +1,9 @@ import SwiftUI -struct SettingsScreen: View, SettingsScreenProtocol { +struct SettingsScreen: SettingsScreenProtocol { @KeychainStorage("connection.token") var token - @SceneStorage("SettingsScreen.choice") - private var choice = Destination.login - var body: some View { Button("Settings.Logout", role: .destructive, action: logout) .controlSize(.large) diff --git a/Fyreplace/Views/ViewProtocol.swift b/Fyreplace/Views/ViewProtocol.swift index dbad0ae..e408a3d 100644 --- a/Fyreplace/Views/ViewProtocol.swift +++ b/Fyreplace/Views/ViewProtocol.swift @@ -1,7 +1,8 @@ import OpenAPIRuntime import Sentry +import SwiftUI -protocol ViewProtocol {} +protocol ViewProtocol: View {} protocol LoadingViewProtocol: ViewProtocol { var isLoading: Bool { get nonmutating set }