Skip to content

Commit

Permalink
move ending refresh to when we hide the progress indiciator
Browse files Browse the repository at this point in the history
  • Loading branch information
brindy committed Jan 17, 2024
1 parent c3112f7 commit 06f8b42
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions DuckDuckGo/TabViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -654,6 +653,7 @@ class TabViewController: UIViewController {

private func hideProgressIndicator() {
progressWorker.didFinishLoading()
webView.scrollView.refreshControl?.endRefreshing()
}

public func reload() {
Expand Down Expand Up @@ -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)

Check failure on line 1184 in DuckDuckGo/TabViewController.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Lines should not have trailing whitespace (trailing_whitespace)
tabModel.link = link
delegate?.tabLoadingStateDidChange(tab: self)

Expand Down

0 comments on commit 06f8b42

Please sign in to comment.