rename function param to avoid conflict with struct var

This commit is contained in:
Satindar Dhillon 2022-07-13 09:55:51 -07:00
parent fbb2565d11
commit 282b3a104e
2 changed files with 3 additions and 3 deletions

View file

@ -40,7 +40,7 @@ import Views
do {
try await dataService.deleteAccount(userID: currentViewer.unwrappedUserID)
authenticator.logout(dataService: dataService, showAppleRevokeTokenAlert: true)
authenticator.logout(dataService: dataService, isAccountDeletion: true)
} catch {
deleteAccountErrorMessage = "We were unable to delete your account."
}

View file

@ -37,12 +37,12 @@ public final class Authenticator: ObservableObject {
ValetKey.authToken.value()
}
public func logout(dataService: DataService, showAppleRevokeTokenAlert _: Bool = false) {
public func logout(dataService: DataService, isAccountDeletion: Bool = false) {
dataService.resetCoreData()
clearCreds()
Authenticator.unregisterIntercomUser?()
isLoggedIn = false
showAppleRevokeTokenAlert = true
showAppleRevokeTokenAlert = isAccountDeletion
}
public func clearCreds() {