From 282b3a104eb5f438358e96795c964ebafd053fe6 Mon Sep 17 00:00:00 2001 From: Satindar Dhillon Date: Wed, 13 Jul 2022 09:55:51 -0700 Subject: [PATCH] rename function param to avoid conflict with struct var --- apple/OmnivoreKit/Sources/App/Views/Profile/ProfileView.swift | 2 +- .../Sources/Services/Authentication/Authenticator.swift | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apple/OmnivoreKit/Sources/App/Views/Profile/ProfileView.swift b/apple/OmnivoreKit/Sources/App/Views/Profile/ProfileView.swift index cabea0942..1f327fd83 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Profile/ProfileView.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Profile/ProfileView.swift @@ -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." } diff --git a/apple/OmnivoreKit/Sources/Services/Authentication/Authenticator.swift b/apple/OmnivoreKit/Sources/Services/Authentication/Authenticator.swift index 2d5a5dc6b..b0ccfba59 100644 --- a/apple/OmnivoreKit/Sources/Services/Authentication/Authenticator.swift +++ b/apple/OmnivoreKit/Sources/Services/Authentication/Authenticator.swift @@ -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() {