From 06f8b42573ad9e7806b1a24f1c8c9a8408c83ba6 Mon Sep 17 00:00:00 2001 From: Chris Brind Date: Wed, 17 Jan 2024 19:53:55 +0000 Subject: [PATCH] move ending refresh to when we hide the progress indiciator --- DuckDuckGo/TabViewController.swift | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/DuckDuckGo/TabViewController.swift b/DuckDuckGo/TabViewController.swift index 8c489442ff..a730cc1ffe 100644 --- a/DuckDuckGo/TabViewController.swift +++ b/DuckDuckGo/TabViewController.swift @@ -418,7 +418,6 @@ class TabViewController: UIViewController { webView.scrollView.refreshControl = UIRefreshControl() webView.scrollView.refreshControl?.addAction(UIAction { [weak self] _ in self?.reload() - self?.webView.scrollView.refreshControl?.endRefreshing() }, for: .valueChanged) webView.scrollView.refreshControl?.backgroundColor = .systemBackground @@ -654,6 +653,7 @@ class TabViewController: UIViewController { private func hideProgressIndicator() { progressWorker.didFinishLoading() + webView.scrollView.refreshControl?.endRefreshing() } public func reload() { @@ -1181,10 +1181,7 @@ extension TabViewController: WKNavigationDelegate { } private func onWebpageDidFinishLoading() { - os_log("webpageLoading finished", log: .generalLog, type: .debug) - - Swift.print("***", #function, webView.scrollView.contentOffset, webView.scrollView.contentInset) - + os_log("webpageLoading finished", log: .generalLog, type: .debug) tabModel.link = link delegate?.tabLoadingStateDidChange(tab: self)