refactor open in app browser with global shortcuts

This commit is contained in:
Rizwan Mohamed Ibrahim
2020-05-29 20:39:04 +05:30
parent d671029828
commit f2cd09aae3
4 changed files with 11 additions and 17 deletions

View File

@@ -1185,15 +1185,16 @@ class SceneCoordinator: NSObject, UndoableCommandRunner, UnreadCountProvider {
}
UIApplication.shared.open(url, options: [:])
}
func showInAppBrowserForCurrentArticle() {
articleViewController?.openInAppBrowser()
}
func showInAppBrowserForCurrentFeed() {
masterFeedViewController.openInAppBrowser()
}
func showInAppBrowser() {
if currentArticle != nil {
articleViewController?.openInAppBrowser()
}
else {
masterFeedViewController.openInAppBrowser()
}
}
func navigateToFeeds() {
masterFeedViewController?.focus()
selectArticle(nil)