adds "Open In App Browser" shortcut

This commit is contained in:
Rizwan Mohamed Ibrahim
2020-05-15 12:39:33 +05:30
parent f7f7f4dddb
commit c9ebb6bd75
7 changed files with 37 additions and 24 deletions

View File

@@ -226,7 +226,15 @@ class WebViewController: UIViewController {
activityViewController.popoverPresentationController?.barButtonItem = popOverBarButtonItem
present(activityViewController, animated: true)
}
func openInAppBrowser() {
guard let preferredLink = article?.preferredLink, let url = URL(string: preferredLink) else {
return
}
let vc = SFSafariViewController(url: url)
present(vc, animated: true)
}
}
// MARK: ArticleExtractorDelegate