Skip to content

Commit 53ec80b

Browse files
author
Achyut Kumar M
committed
prevent residual values
1 parent daf6e9e commit 53ec80b

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

GoInfoGame/GoInfoGame/Login/PasswordAuthenticationPopupView.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ struct PasswordAuthenticationPopupView: View {
5454
.padding(40)
5555

5656
if viewModel.isLoading {
57-
ProgressView("Logging in...")
57+
ProgressView("Autheticating...")
5858
.frame(maxWidth: .infinity, maxHeight: .infinity)
5959
.background(Color.black.opacity(0.3).ignoresSafeArea())
6060
}
@@ -72,7 +72,6 @@ struct PasswordAuthenticationPopupView: View {
7272
onSuccess()
7373
},
7474
onFailure: { error in
75-
// Nothing here; viewModel will handle errorMessage
7675
viewModel.errorMessage = error
7776
onFailure(error)
7877
}

GoInfoGame/GoInfoGame/UserProfile/View/UserProfileView.swift

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ struct UserProfileView: View {
1919
@State private var userManuallyToggled = false
2020

2121
@State private var showPasswordAuthenticationView: Bool = false
22-
23-
@StateObject private var passwordAuthenticationViewModel = PasswordAuthenticationViewModel()
24-
22+
2523
private var biometricToggleText: String {
2624
let context = LAContext()
2725
_ = context.canEvaluatePolicy(.deviceOwnerAuthenticationWithBiometrics, error: nil)
@@ -72,16 +70,15 @@ struct UserProfileView: View {
7270
}
7371
.overlay {
7472
if showPasswordAuthenticationView {
75-
PasswordAuthenticationPopupView(viewModel: passwordAuthenticationViewModel) {
73+
PasswordAuthenticationPopupView(viewModel: PasswordAuthenticationViewModel()) {
7674
useBiometricID = true
7775
showPasswordAuthenticationView = false
78-
print("TO DO : Handle password authentication")
7976
} onCancel: {
8077
useBiometricID = false
8178
showPasswordAuthenticationView = false
8279
} onFailure: { error in
8380
useBiometricID = false
84-
showPasswordAuthenticationView = false
81+
8582

8683
}
8784

0 commit comments

Comments
 (0)