forked from organicmaps/organicmaps
[ios] [mapsme-9399] allowed to delete and edit shared bookmarks from the place page
This commit is contained in:
parent
9008821662
commit
8df01649f4
5 changed files with 6 additions and 6 deletions
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
@protocol MWMActionBarSharedData<NSObject>
|
||||
|
||||
- (BOOL)isBookmark;
|
||||
- (BOOL)isBookmarkFromCatalog;
|
||||
- (BOOL)isBookmarkEditable;
|
||||
- (BOOL)isOpentable;
|
||||
- (BOOL)isPartner;
|
||||
- (BOOL)isBooking;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue