Skip to content

Commit 90c0679

Browse files
committed
Only show Sign Out button when actually authenticated
1 parent a0e258a commit 90c0679

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Xcodes/SettingsView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ struct SettingsView: View {
99
VStack(alignment: .leading) {
1010
GroupBox(label: Text("Apple ID")) {
1111
VStack(alignment: .leading) {
12-
if let username = Current.defaults.string(forKey: "username") {
13-
Text(username)
12+
if appState.authenticationState == .authenticated {
13+
Text(Current.defaults.string(forKey: "username") ?? "-")
1414
Button("Sign Out", action: appState.signOut)
1515
} else {
1616
Button("Sign In", action: { self.appState.presentingSignInAlert = true })

0 commit comments

Comments
 (0)