[iOS] fix crash when restoring bookmarks

This commit is contained in:
Aleksey Belouosv 2018-10-10 20:20:07 +03:00 committed by Daria Volvenkova
parent 63855a7400
commit 0c83c62f0d
2 changed files with 3 additions and 1 deletions

View file

@ -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"),

View file

@ -15,7 +15,8 @@ typedef NS_ENUM(NSUInteger, MWMSynchronizationResult)
MWMSynchronizationResultAuthError,
MWMSynchronizationResultNetworkError,
MWMSynchronizationResultDiskError,
MWMSynchronizationResultUserInterrupted
MWMSynchronizationResultUserInterrupted,
MWMSynchronizationResultInvalidCall
};
@protocol MWMBookmarksObserver<NSObject>