Skip to content

Commit

Permalink
Updated Login details auth state check to be in line with the main Lo…
Browse files Browse the repository at this point in the history
…gin screen
  • Loading branch information
amddg44 committed Sep 11, 2023
1 parent 7eb7617 commit ae6ac55
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions DuckDuckGo/AutofillLoginDetailsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class AutofillLoginDetailsViewController: UIViewController {

override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
if !authenticationNotRequired && authenticator.state == .loggedIn {
if !authenticationNotRequired {
authenticator.authenticate()
}
}
Expand All @@ -118,7 +118,7 @@ class AutofillLoginDetailsViewController: UIViewController {
super.viewWillDisappear(animated)
if isMovingFromParent {
AppDependencyProvider.shared.autofillLoginSession.lastAccessedAccount = nil
} else if authenticator.canAuthenticate() {
} else if authenticator.canAuthenticate() && authenticator.state == .loggedIn {
AppDependencyProvider.shared.autofillLoginSession.startSession()
}
}
Expand Down

0 comments on commit ae6ac55

Please sign in to comment.