diff --git a/Xcodes/SettingsView.swift b/Xcodes/SettingsView.swift index 57d9883..6a8212f 100644 --- a/Xcodes/SettingsView.swift +++ b/Xcodes/SettingsView.swift @@ -9,8 +9,8 @@ struct SettingsView: View { VStack(alignment: .leading) { GroupBox(label: Text("Apple ID")) { VStack(alignment: .leading) { - if let username = Current.defaults.string(forKey: "username") { - Text(username) + if appState.authenticationState == .authenticated { + Text(Current.defaults.string(forKey: "username") ?? "-") Button("Sign Out", action: appState.signOut) } else { Button("Sign In", action: { self.appState.presentingSignInAlert = true })