From 0c83c62f0db57d494d7f0df52f877ac673da2ecb Mon Sep 17 00:00:00 2001 From: Aleksey Belouosv Date: Wed, 10 Oct 2018 20:20:07 +0300 Subject: [PATCH] [iOS] fix crash when restoring bookmarks --- .../Categories/BMCViewModel/BMCDefaultViewModel.swift | 1 + iphone/Maps/Core/Bookmarks/MWMBookmarksObserver.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/iphone/Maps/Bookmarks/Categories/BMCViewModel/BMCDefaultViewModel.swift b/iphone/Maps/Bookmarks/Categories/BMCViewModel/BMCDefaultViewModel.swift index bca82faa8e..934398aaf4 100644 --- a/iphone/Maps/Bookmarks/Categories/BMCViewModel/BMCDefaultViewModel.swift +++ b/iphone/Maps/Bookmarks/Categories/BMCViewModel/BMCDefaultViewModel.swift @@ -259,6 +259,7 @@ extension BMCDefaultViewModel: MWMBookmarksObserver { func onSynchronizationFinished(_ result: MWMSynchronizationResult) { MWMAlertViewController.activeAlert().closeAlert() { [weak self] in switch result { + case .invalidCall: fallthrough case .networkError: fallthrough case .authError: MWMAlertViewController.activeAlert().presentDefaultAlert(withTitle: L("error_server_title"), diff --git a/iphone/Maps/Core/Bookmarks/MWMBookmarksObserver.h b/iphone/Maps/Core/Bookmarks/MWMBookmarksObserver.h index 6b66d7db13..431d7ca863 100644 --- a/iphone/Maps/Core/Bookmarks/MWMBookmarksObserver.h +++ b/iphone/Maps/Core/Bookmarks/MWMBookmarksObserver.h @@ -15,7 +15,8 @@ typedef NS_ENUM(NSUInteger, MWMSynchronizationResult) MWMSynchronizationResultAuthError, MWMSynchronizationResultNetworkError, MWMSynchronizationResultDiskError, - MWMSynchronizationResultUserInterrupted + MWMSynchronizationResultUserInterrupted, + MWMSynchronizationResultInvalidCall }; @protocol MWMBookmarksObserver