From 779d153c9fc4139904427d1c1fc1c2949d2c0ae0 Mon Sep 17 00:00:00 2001 From: Aleksey Belouosv Date: Tue, 27 Aug 2019 13:05:45 +0300 Subject: [PATCH] [iOS] fix bug in which "no internet" error appears on backward navigation in catalog https://jira.mail.ru/browse/MAPSME-11619 --- iphone/Maps/Bookmarks/Catalog/CatalogWebViewController.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iphone/Maps/Bookmarks/Catalog/CatalogWebViewController.swift b/iphone/Maps/Bookmarks/Catalog/CatalogWebViewController.swift index 5910d0eb29..906b1098fd 100644 --- a/iphone/Maps/Bookmarks/Catalog/CatalogWebViewController.swift +++ b/iphone/Maps/Bookmarks/Catalog/CatalogWebViewController.swift @@ -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 }