diff --git a/iphone/Maps/Bookmarks/Categories/BMCViewModel/BMCDefaultViewModel.swift b/iphone/Maps/Bookmarks/Categories/BMCViewModel/BMCDefaultViewModel.swift index 71afe25e92..e5884f4dcd 100644 --- a/iphone/Maps/Bookmarks/Categories/BMCViewModel/BMCDefaultViewModel.swift +++ b/iphone/Maps/Bookmarks/Categories/BMCViewModel/BMCDefaultViewModel.swift @@ -252,7 +252,7 @@ extension BMCDefaultViewModel: MWMBookmarksObserver { filesPrepared = true } - func onRestoringFinished(_ result: MWMSynchronizationResult) { + func onSynchronizationFinished(_ result: MWMSynchronizationResult) { MWMAlertViewController.activeAlert().closeAlert() { [weak self] in switch result { case .networkError: fallthrough diff --git a/iphone/Maps/Core/Bookmarks/MWMBookmarksManager.mm b/iphone/Maps/Core/Bookmarks/MWMBookmarksManager.mm index d35940a95c..9fe30d570f 100644 --- a/iphone/Maps/Core/Bookmarks/MWMBookmarksManager.mm +++ b/iphone/Maps/Core/Bookmarks/MWMBookmarksManager.mm @@ -161,12 +161,9 @@ NSString * const CloudErrorToString(Cloud::SynchronizationResult result) withParameters:@{kStatType: error, kStatError: @(errorStr.c_str())}]; } - if (type != Cloud::SynchronizationType::Restore) - return; - [[MWMBookmarksManager manager] loopObservers:^(Observer observer) { - if ([observer respondsToSelector:@selector(onRestoringFinished:)]) - [observer onRestoringFinished:static_cast(my::Key(result))]; + if ([observer respondsToSelector:@selector(onSynchronizationFinished:)]) + [observer onSynchronizationFinished:static_cast(my::Key(result))]; }]; }; diff --git a/iphone/Maps/Core/Bookmarks/MWMBookmarksObserver.h b/iphone/Maps/Core/Bookmarks/MWMBookmarksObserver.h index 14dd178518..5ea361c62d 100644 --- a/iphone/Maps/Core/Bookmarks/MWMBookmarksObserver.h +++ b/iphone/Maps/Core/Bookmarks/MWMBookmarksObserver.h @@ -24,7 +24,7 @@ typedef NS_ENUM(NSUInteger, MWMSynchronizationResult) @optional - (void)onRestoringRequest:(MWMRestoringRequestResult)result backupDate:(NSDate * _Nullable)date; -- (void)onRestoringFinished:(MWMSynchronizationResult)result; +- (void)onSynchronizationFinished:(MWMSynchronizationResult)result; - (void)onRestoringStarted; - (void)onRestoringFilesPrepared; - (void)onBookmarksLoadFinished;