[iOS] fix bug in which "no internet" error appears on backward navigation in catalog

https://jira.mail.ru/browse/MAPSME-11619
This commit is contained in:
Aleksey Belouosv 2019-08-27 13:05:45 +03:00 committed by Aleksey Belousov
parent 6fa24d9a8f
commit 779d153c9f

View file

@ -191,9 +191,12 @@ final class CatalogWebViewController: WebViewController {
}
override func webView(_ webView: WKWebView, didFail navigation: WKNavigation!, withError error: Error) {
loadingIndicator.stopAnimating()
if let error = error as NSError?, error.code == NSURLErrorCancelled {
return
}
Statistics.logEvent("Bookmarks_Downloaded_Catalogue_error",
withParameters: [kStatError : kStatUnknown])
loadingIndicator.stopAnimating()
noInternetView.isHidden = false
}