Open SafariVC on homepage row tap
This commit is contained in:
parent
1a58118a73
commit
7849c66e03
@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
import Account
|
import Account
|
||||||
|
import SafariServices
|
||||||
|
|
||||||
class WebFeedInspectorViewController: UITableViewController {
|
class WebFeedInspectorViewController: UITableViewController {
|
||||||
|
|
||||||
@ -31,6 +32,8 @@ class WebFeedInspectorViewController: UITableViewController {
|
|||||||
return FaviconGenerator.favicon(webFeed)
|
return FaviconGenerator.favicon(webFeed)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private let homePageIndexPath = IndexPath(row: 0, section: 1)
|
||||||
|
|
||||||
override func viewDidLoad() {
|
override func viewDidLoad() {
|
||||||
tableView.register(InspectorIconHeaderView.self, forHeaderFooterViewReuseIdentifier: "SectionHeader")
|
tableView.register(InspectorIconHeaderView.self, forHeaderFooterViewReuseIdentifier: "SectionHeader")
|
||||||
|
|
||||||
@ -91,6 +94,17 @@ extension WebFeedInspectorViewController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
|
||||||
|
if indexPath == homePageIndexPath,
|
||||||
|
let homePageUrlString = webFeed.homePageURL,
|
||||||
|
let homePageUrl = URL(string: homePageUrlString) {
|
||||||
|
|
||||||
|
let safari = SFSafariViewController(url: homePageUrl)
|
||||||
|
present(safari, animated: true)
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: UITextFieldDelegate
|
// MARK: UITextFieldDelegate
|
||||||
|
Loading…
x
Reference in New Issue
Block a user