Merge branch 'ios-release'
This commit is contained in:
commit
14d8e9af30
|
@ -202,12 +202,7 @@ class ArticleViewController: UIViewController {
|
|||
}
|
||||
|
||||
@objc func contentSizeCategoryDidChange(_ note: Notification) {
|
||||
coordinator.webViewProvider.flushQueue()
|
||||
coordinator.webViewProvider.replenishQueueIfNeeded()
|
||||
if let controller = currentWebViewController {
|
||||
controller.fullReload()
|
||||
self.pageViewController.setViewControllers([controller], direction: .forward, animated: false, completion: nil)
|
||||
}
|
||||
resetWebViewController()
|
||||
}
|
||||
|
||||
@objc func willEnterForeground(_ note: Notification) {
|
||||
|
@ -215,6 +210,7 @@ class ArticleViewController: UIViewController {
|
|||
if AppDefaults.articleFullscreenEnabled {
|
||||
currentWebViewController?.hideBars()
|
||||
}
|
||||
resetWebViewController()
|
||||
}
|
||||
|
||||
// MARK: Actions
|
||||
|
@ -274,10 +270,6 @@ class ArticleViewController: UIViewController {
|
|||
currentWebViewController?.scrollPageDown()
|
||||
}
|
||||
|
||||
func fullReload() {
|
||||
currentWebViewController?.fullReload()
|
||||
}
|
||||
|
||||
func stopArticleExtractorIfProcessing() {
|
||||
currentWebViewController?.stopArticleExtractorIfProcessing()
|
||||
}
|
||||
|
@ -366,4 +358,13 @@ private extension ArticleViewController {
|
|||
return controller
|
||||
}
|
||||
|
||||
func resetWebViewController() {
|
||||
coordinator.webViewProvider.flushQueue()
|
||||
coordinator.webViewProvider.replenishQueueIfNeeded()
|
||||
if let controller = currentWebViewController {
|
||||
controller.fullReload()
|
||||
self.pageViewController.setViewControllers([controller], direction: .forward, animated: false, completion: nil)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -149,7 +149,8 @@ class WebViewController: UIViewController {
|
|||
}
|
||||
|
||||
func fullReload() {
|
||||
self.loadWebView()
|
||||
view.subviews.first?.removeFromSuperview()
|
||||
loadWebView()
|
||||
}
|
||||
|
||||
func showBars() {
|
||||
|
@ -289,10 +290,10 @@ extension WebViewController: UIContextMenuInteractionDelegate {
|
|||
// MARK: WKNavigationDelegate
|
||||
|
||||
extension WebViewController: WKNavigationDelegate {
|
||||
|
||||
func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, decisionHandler: @escaping (WKNavigationActionPolicy) -> Void) {
|
||||
|
||||
if navigationAction.navigationType == .linkActivated {
|
||||
|
||||
guard let url = navigationAction.request.url else {
|
||||
decisionHandler(.allow)
|
||||
return
|
||||
|
@ -314,13 +315,13 @@ extension WebViewController: WKNavigationDelegate {
|
|||
} else {
|
||||
decisionHandler(.allow)
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
decisionHandler(.allow)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
func webViewWebContentProcessDidTerminate(_ webView: WKWebView) {
|
||||
fullReload()
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -73,16 +73,13 @@ class MasterFeedTableViewSectionHeader: UITableViewHeaderFooterView {
|
|||
|
||||
private let unreadCountView = MasterFeedUnreadCountView(frame: CGRect.zero)
|
||||
|
||||
@available(iOS 13.4, *)
|
||||
private(set) lazy var disclosurePointerInteraction = UIPointerInteraction()
|
||||
|
||||
private lazy var disclosureButton: UIButton = {
|
||||
let button = NonIntrinsicButton()
|
||||
button.tintColor = UIColor.tertiaryLabel
|
||||
button.setImage(AppAssets.disclosureImage, for: .normal)
|
||||
button.contentMode = .center
|
||||
if #available(iOS 13.4, *) {
|
||||
button.addInteraction(disclosurePointerInteraction)
|
||||
button.addInteraction(UIPointerInteraction())
|
||||
}
|
||||
button.addTarget(self, action: #selector(toggleDisclosure), for: .touchUpInside)
|
||||
return button
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
// High Level Settings common to both the iOS application and any extensions we bundle with it
|
||||
MARKETING_VERSION = 5.0.1
|
||||
CURRENT_PROJECT_VERSION = 43
|
||||
CURRENT_PROJECT_VERSION = 44
|
||||
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon
|
||||
|
|
Loading…
Reference in New Issue