Various fixes

This commit is contained in:
Ilya Laktyushin
2024-08-01 18:57:48 +02:00
parent 076bfc4ebd
commit 07c46dfc7e
8 changed files with 87 additions and 73 deletions

View File

@@ -239,7 +239,7 @@ final class BrowserWebContent: UIView, BrowserContent, WKNavigationDelegate, WKU
let request = URLRequest(url: parsedUrl)
self.webView.load(request)
title = parsedUrl.host ?? ""
title = getDisplayUrl(url, hostOnly: true)
}
self.errorView = ComponentHostView()
@@ -744,7 +744,7 @@ final class BrowserWebContent: UIView, BrowserContent, WKNavigationDelegate, WKU
}
func webView(_ webView: WKWebView, didFailProvisionalNavigation navigation: WKNavigation!, withError error: Error) {
if [-1003, -1100].contains((error as NSError).code) {
if [-1003, -1100, 102].contains((error as NSError).code) {
self.currentError = error
} else {
self.currentError = nil