[ios] add hasBookmark to the BM manager

Signed-off-by: Kiryl Kaveryn <kirylkaveryn@gmail.com>
This commit is contained in:
Kiryl Kaveryn 2024-05-15 20:55:40 +04:00 committed by Viktor Havaka
parent ad09f67da0
commit 8a39e3102c
2 changed files with 6 additions and 0 deletions

View file

@ -61,6 +61,7 @@ NS_SWIFT_NAME(BookmarksManager)
- (void)setUserCategoriesVisible:(BOOL)isVisible;
- (void)deleteCategory:(MWMMarkGroupID)groupId;
- (BOOL)checkCategoryName:(NSString *)name;
- (BOOL)hasBookmark:(MWMMarkID)bookmarkId;
- (NSArray<NSNumber *> *)availableSortingTypes:(MWMMarkGroupID)groupId hasMyPosition:(BOOL)hasMyPosition;
- (void)sortBookmarks:(MWMMarkGroupID)groupId
sortingType:(MWMBookmarksSortingType)sortingType

View file

@ -339,6 +339,11 @@ static BookmarkManager::SortingType convertSortingTypeToCore(MWMBookmarksSorting
return !self.bm.IsUsedCategoryName(name.UTF8String);
}
- (BOOL)hasBookmark:(MWMMarkID)bookmarkId
{
return self.bm.HasBookmark(bookmarkId);
}
- (NSArray<NSNumber *> *)availableSortingTypes:(MWMMarkGroupID)groupId hasMyPosition:(BOOL)hasMyPosition{
auto const availableTypes = self.bm.GetAvailableSortingTypes(groupId, hasMyPosition);
NSMutableArray *result = [NSMutableArray array];