Reconcile with 6.1.6-ios branch.

This commit is contained in:
Brent Simmons
2025-01-03 14:45:03 -08:00
parent 8a45b319f7
commit 0d70b9f4ad
9 changed files with 54 additions and 46 deletions

View File

@@ -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