Tabs: Fix issue where tab sometimes has the wrong favicon after a redirect.

This commit is contained in:
James Magahern
2021-07-13 16:47:24 -07:00
parent 656cf55b96
commit 560b1a4a75

View File

@@ -52,6 +52,14 @@ extension BrowserViewController: WKNavigationDelegate, WKUIDelegate
} }
} }
func webView(_ webView: WKWebView, didReceiveServerRedirectForProvisionalNavigation navigation: WKNavigation!) {
// We got rugged!!!!!! Update the favicon again.
if let url = webView.url {
// Start requesting favicon
tab.updateFaviconForURL(url)
}
}
func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) { func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {
toolbarController.urlBar.loadProgress = .complete toolbarController.urlBar.loadProgress = .complete