mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-12-01 18:10:16 +00:00
Hand off the web page instead of the article while the in-app browser is open. Fixes #5369.
This commit is contained in:
1 parent
5a47d7993d
commit
166b60b59f
3 files changed
+40
No files matched your search
@@ -888,10 +888,21 @@ private extension WebViewController {
|
||||
guard let viewController = SFSafariViewController.safeSafariViewController(url) else {
|
||||
return
|
||||
}
|
||||
viewController.delegate = self
|
||||
coordinator?.beganBrowsing(url: url)
|
||||
present(viewController, animated: true)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: SFSafariViewControllerDelegate
|
||||
|
||||
extension WebViewController: @preconcurrency SFSafariViewControllerDelegate {
|
||||
|
||||
func safariViewControllerDidFinish(_ controller: SFSafariViewController) {
|
||||
coordinator?.endedBrowsing()
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: Find in Article
|
||||
|
||||
private struct FindInArticleOptions: Codable {
|
||||
|
||||
@@ -1528,6 +1528,14 @@ struct SidebarItemNode: Hashable, Sendable {
|
||||
}
|
||||
}
|
||||
|
||||
func beganBrowsing(url: URL) {
|
||||
activityManager.browsing(url: url)
|
||||
}
|
||||
|
||||
func endedBrowsing() {
|
||||
activityManager.invalidateBrowsing()
|
||||
}
|
||||
|
||||
func navigateToFeeds() {
|
||||
mainFeedCollectionViewController?.focus()
|
||||
selectArticle(nil)
|
||||
|
||||
Reference in new issue
Block a user