forked from organicmaps/organicmaps
[ios] Update UI after synchronization finished
This commit is contained in:
parent
fdba846006
commit
1a86eb4440
3 changed files with 4 additions and 7 deletions
|
@ -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
|
||||
|
|
|
@ -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<MWMSynchronizationResult>(my::Key(result))];
|
||||
if ([observer respondsToSelector:@selector(onSynchronizationFinished:)])
|
||||
[observer onSynchronizationFinished:static_cast<MWMSynchronizationResult>(my::Key(result))];
|
||||
}];
|
||||
};
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue