Fix regression that prevented universal links from working

This commit is contained in:
Maurice Parker 2021-09-01 14:13:04 -05:00
parent 3390ff403f
commit 56bbfe713b
1 changed files with 7 additions and 2 deletions

View File

@ -351,8 +351,13 @@ extension WebViewController: WKNavigationDelegate {
if AppDefaults.shared.useSystemBrowser {
UIApplication.shared.open(url, options: [:])
} else {
let vc = SFSafariViewController(url: url)
self.present(vc, animated: true, completion: nil)
UIApplication.shared.open(url, options: [.universalLinksOnly: true]) { didOpen in
guard didOpen == false else {
return
}
let vc = SFSafariViewController(url: url)
self.present(vc, animated: true)
}
}
} else if components?.scheme == "mailto" {