Skip to content

Commit

Permalink
Fix brave/brave-ios#7991: Opening in private using app context menu o…
Browse files Browse the repository at this point in the history
…r shortcut widget does not respect biometrics toggle (brave/brave-ios#7992)

Adding private lock case to the external link open
  • Loading branch information
soner-yuksel authored Aug 29, 2023
1 parent 1021b57 commit 8e68ef6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
10 changes: 7 additions & 3 deletions Sources/Brave/Frontend/Browser/NavigationRouter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,14 @@ public enum NavigationPath: Equatable {
if Preferences.Privacy.lockWithPasscode.value {
bvc.openBlankNewTab(attemptLocationFieldFocus: false, isPrivate: true)
} else {
bvc.askForLocalAuthentication(viewType: .widget) { [weak bvc] success, _ in
if success {
bvc?.openBlankNewTab(attemptLocationFieldFocus: false, isPrivate: true)
if Preferences.Privacy.privateBrowsingLock.value {
bvc.askForLocalAuthentication(viewType: .widget) { [weak bvc] success, _ in
if success {
bvc?.openBlankNewTab(attemptLocationFieldFocus: false, isPrivate: true)
}
}
} else {
bvc.openBlankNewTab(attemptLocationFieldFocus: false, isPrivate: true)
}
}
case .bookmarks:
Expand Down
10 changes: 7 additions & 3 deletions Sources/Brave/Frontend/Browser/QuickActions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,14 @@ public class QuickActions: NSObject {
if Preferences.Privacy.lockWithPasscode.value {
handleOpenNewTab(withBrowserViewController: browserViewController, isPrivate: true)
} else {
browserViewController.askForLocalAuthentication(viewType: .widget) { [weak self] success, _ in
if success {
self?.handleOpenNewTab(withBrowserViewController: browserViewController, isPrivate: true)
if Preferences.Privacy.privateBrowsingLock.value {
browserViewController.askForLocalAuthentication(viewType: .widget) { [weak self] success, _ in
if success {
self?.handleOpenNewTab(withBrowserViewController: browserViewController, isPrivate: true)
}
}
} else {
handleOpenNewTab(withBrowserViewController: browserViewController, isPrivate: true)
}
}
case .scanQRCode:
Expand Down

0 comments on commit 8e68ef6

Please sign in to comment.