mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Reconcile with 6.1.6-ios branch.
This commit is contained in:
@@ -45,6 +45,8 @@ class ArticleViewController: UIViewController {
|
||||
|
||||
weak var coordinator: SceneCoordinator!
|
||||
|
||||
private let poppableDelegate = PoppableGestureRecognizerDelegate()
|
||||
|
||||
var article: Article? {
|
||||
didSet {
|
||||
if let controller = currentWebViewController, controller.article != article {
|
||||
@@ -101,6 +103,11 @@ class ArticleViewController: UIViewController {
|
||||
articleExtractorButton.addTarget(self, action: #selector(toggleArticleExtractor(_:)), for: .touchUpInside)
|
||||
toolbarItems?.insert(UIBarButtonItem(customView: articleExtractorButton), at: 6)
|
||||
|
||||
if let parentNavController = navigationController?.parent as? UINavigationController {
|
||||
poppableDelegate.navigationController = parentNavController
|
||||
parentNavController.interactivePopGestureRecognizer?.delegate = poppableDelegate
|
||||
}
|
||||
|
||||
pageViewController = UIPageViewController(transitionStyle: .scroll, navigationOrientation: .horizontal, options: [:])
|
||||
pageViewController.delegate = self
|
||||
pageViewController.dataSource = self
|
||||
@@ -154,6 +161,16 @@ class ArticleViewController: UIViewController {
|
||||
|
||||
updateUI()
|
||||
}
|
||||
|
||||
override func viewWillAppear(_ animated: Bool) {
|
||||
let hideToolbars = AppDefaults.shared.articleFullscreenEnabled
|
||||
if hideToolbars {
|
||||
currentWebViewController?.hideBars()
|
||||
} else {
|
||||
currentWebViewController?.showBars()
|
||||
}
|
||||
super.viewWillAppear(animated)
|
||||
}
|
||||
|
||||
override func viewDidAppear(_ animated: Bool) {
|
||||
super.viewDidAppear(true)
|
||||
@@ -161,6 +178,7 @@ class ArticleViewController: UIViewController {
|
||||
}
|
||||
|
||||
override func viewWillDisappear(_ animated: Bool) {
|
||||
super.viewWillDisappear(animated)
|
||||
if searchBar != nil && !searchBar.isHidden {
|
||||
endFind()
|
||||
}
|
||||
@@ -211,7 +229,6 @@ class ArticleViewController: UIViewController {
|
||||
starBarButtonItem.image = AppAssets.starOpenImage
|
||||
starBarButtonItem.accLabelText = NSLocalizedString("Star Article", comment: "Star Article")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// MARK: Notifications
|
||||
|
||||
Reference in New Issue
Block a user