[ios] [mapsme-9399] allowed to delete and edit shared bookmarks from the place page

This commit is contained in:
o.bolovintseva 2019-01-15 15:25:58 +03:00 committed by Aleksey Belousov
parent 9008821662
commit 8df01649f4
5 changed files with 6 additions and 6 deletions

View file

@ -219,7 +219,7 @@ using NewSectionsAreReady = void (^)(NSRange const & range, MWMPlacePageData * d
- (NSString *)bookmarkCategory;
- (kml::MarkId)bookmarkId;
- (kml::MarkGroupId)bookmarkCategoryId;
- (BOOL)isBookmarkFromCatalog;
- (BOOL)isBookmarkEditable;
// Local Ads
- (NSString *)localAdsURL;

View file

@ -695,9 +695,9 @@ NSString * const kUserDefaultsLatLonAsDMSKey = @"UserDefaultsLatLonAsDMS";
return m_info.GetBookmarkCategoryId();
}
- (BOOL)isBookmarkFromCatalog
- (BOOL)isBookmarkEditable
{
return self.isBookmark && [[MWMBookmarksManager sharedManager] isCategoryFromCatalog:self.bookmarkCategoryId];
return self.isBookmark && [[MWMBookmarksManager sharedManager] isCategoryEditable:self.bookmarkCategoryId];
}
#pragma mark - Local Ads

View file

@ -5,7 +5,7 @@
@protocol MWMActionBarSharedData<NSObject>
- (BOOL)isBookmark;
- (BOOL)isBookmarkFromCatalog;
- (BOOL)isBookmarkEditable;
- (BOOL)isOpentable;
- (BOOL)isPartner;
- (BOOL)isBooking;

View file

@ -130,7 +130,7 @@
for (auto const buttonType : m_visibleButtons)
{
auto const isSelected = (buttonType == EButton::Bookmark ? [data isBookmark] : NO);
auto const isDisabled = (buttonType == EButton::Bookmark && data.isBookmarkFromCatalog);
auto const isDisabled = (buttonType == EButton::Bookmark && [data isBookmark] && !data.isBookmarkEditable);
auto button = [MWMActionBarButton buttonWithDelegate:self
buttonType:buttonType
partnerIndex:partnerIndex

View file

@ -331,7 +331,7 @@ map<MetainfoRows, Class> const kMetaInfoCells = {
updateCellDelegate:self
editBookmarkDelegate:delegate
isHTML:data.isHTMLDescription
isEditable:!data.isBookmarkFromCatalog];
isEditable:data.isBookmarkEditable];
return c;
}
case Sections::Metainfo: