mirror of
https://github.com/XcodesOrg/XcodesApp.git
synced 2026-03-25 08:55:46 +00:00
Move credential auth error somewhere it won't disappear
When signing in, the Sign In button is not always in the view hierarchy, meaning error alerts weren't being shown until the next time the button appeared.
This commit is contained in:
parent
a3e9101397
commit
a0e258a937
1 changed files with 4 additions and 4 deletions
|
|
@ -14,13 +14,13 @@ struct SettingsView: View {
|
|||
Button("Sign Out", action: appState.signOut)
|
||||
} else {
|
||||
Button("Sign In", action: { self.appState.presentingSignInAlert = true })
|
||||
.sheet(isPresented: $appState.presentingSignInAlert) {
|
||||
SignInCredentialsView(isPresented: $appState.presentingSignInAlert)
|
||||
.environmentObject(appState)
|
||||
}
|
||||
}
|
||||
}
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
.sheet(isPresented: $appState.presentingSignInAlert) {
|
||||
SignInCredentialsView(isPresented: $appState.presentingSignInAlert)
|
||||
.environmentObject(appState)
|
||||
}
|
||||
}
|
||||
|
||||
GroupBox(label: Text("Data Source")) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue