diff options
author | Daria Volvenkova <d.volvenkova@corp.mail.ru> | 2017-07-18 17:55:05 +0300 |
---|---|---|
committer | Aleksandr Zatsepin <alexzatsepin@users.noreply.github.com> | 2017-07-20 16:12:12 +0300 |
commit | a82308341ab77a159ef4151918008413bb6fbacd (patch) | |
tree | 34935178e8e04d1de4f4f6988b91a56ff232be41 /iphone/Maps/Bookmarks/BookmarksVC.mm | |
parent | d6e13752611d9bc4a88dc4fafd6464e6e93eb15c (diff) |
Remove user mark guard.
Diffstat (limited to 'iphone/Maps/Bookmarks/BookmarksVC.mm')
-rw-r--r-- | iphone/Maps/Bookmarks/BookmarksVC.mm | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/iphone/Maps/Bookmarks/BookmarksVC.mm b/iphone/Maps/Bookmarks/BookmarksVC.mm index 3d3c45aefc..27f7602dab 100644 --- a/iphone/Maps/Bookmarks/BookmarksVC.mm +++ b/iphone/Maps/Bookmarks/BookmarksVC.mm @@ -85,10 +85,8 @@ extern NSString * const kBookmarkDeletedNotification = @"BookmarkDeletedNotifica [Statistics logEvent:kStatEventName(kStatBookmarks, kStatToggleVisibility) withParameters:@{kStatValue : sender.on ? kStatVisible : kStatHidden}]; BookmarkCategory * cat = GetFramework().GetBmCategory(m_categoryIndex); - { - BookmarkCategory::Guard guard(*cat); - guard.m_controller.SetIsVisible(sender.on); - } + cat->SetIsVisible(sender.on); + cat->NotifyChanges(); cat->SaveToKMLFile(); } @@ -302,13 +300,13 @@ extern NSString * const kBookmarkDeletedNotification = @"BookmarkDeletedNotifica auto bac = BookmarkAndCategory(static_cast<size_t>(indexPath.row), m_categoryIndex); NSValue * value = [NSValue valueWithBytes:&bac objCType:@encode(BookmarkAndCategory)]; [[NSNotificationCenter defaultCenter] postNotificationName:kBookmarkDeletedNotification object:value]; - BookmarkCategory::Guard guard(*cat); - guard.m_controller.DeleteUserMark(indexPath.row); + cat->DeleteUserMark(indexPath.row); [NSNotificationCenter.defaultCenter postNotificationName:kBookmarksChangedNotification object:nil userInfo:nil]; } } + cat->NotifyChanges(); cat->SaveToKMLFile(); size_t previousNumberOfSections = m_numberOfSections; [self calculateSections]; |