Skip to content

Commit

Permalink
Fixed threading issue registering Passkeys
Browse files Browse the repository at this point in the history
  • Loading branch information
charliescheer committed Jul 9, 2024
1 parent 0257253 commit b0cef0c
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions Simplenote/Classes/SPSettingsViewController+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -273,13 +273,15 @@ extension SPSettingsViewController {
}

private func presentPasskeyRegistrationAlert(succeeded: Bool) {
removeActivityIndicator()
DispatchQueue.main.async {
self.removeActivityIndicator()

let title = succeeded ? PasskeyAuthentication.successTitle : PasskeyAuthentication.failureTitle
let message = succeeded ? PasskeyAuthentication.successMessage : PasskeyAuthentication.failureMessage
let alert = UIAlertController(title: title, message: message, preferredStyle: .alert)
alert.addCancelActionWithTitle(PasskeyAuthentication.okay)
self.present(alert, animated: true)
let title = succeeded ? PasskeyAuthentication.successTitle : PasskeyAuthentication.failureTitle
let message = succeeded ? PasskeyAuthentication.successMessage : PasskeyAuthentication.failureMessage
let alert = UIAlertController(title: title, message: message, preferredStyle: .alert)
alert.addCancelActionWithTitle(PasskeyAuthentication.okay)
self.present(alert, animated: true)
}
}

}
Expand Down

0 comments on commit b0cef0c

Please sign in to comment.