From 3d01e9af238d7d93cc3d3005aa96f63f9cb1025a Mon Sep 17 00:00:00 2001 From: Alexander Boriskov Date: Tue, 29 Oct 2019 18:21:51 +0300 Subject: [PATCH] =?UTF-8?q?[iOS]=20Sharing=20Options=20=D0=BF=D1=83=D1=81?= =?UTF-8?q?=D1=82=D0=BE=D0=B9=20=D0=B3=D1=80=D1=83=D0=BF=D0=BF=D1=8B=20?= =?UTF-8?q?=D0=B0=D0=BA=D1=82=D0=B8=D0=B2=D0=BD=D0=B0=20=D0=BF=D1=80=D0=B8?= =?UTF-8?q?=20=D1=82=D0=B0=D0=BF=D0=B5=20=D0=BD=D0=B0=20More?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://jira.mail.ru/browse/MAPSME-12120 --- iphone/Maps/Bookmarks/BookmarksVC.mm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/iphone/Maps/Bookmarks/BookmarksVC.mm b/iphone/Maps/Bookmarks/BookmarksVC.mm index d4875e94cd..d117fad05b 100644 --- a/iphone/Maps/Bookmarks/BookmarksVC.mm +++ b/iphone/Maps/Bookmarks/BookmarksVC.mm @@ -293,17 +293,22 @@ using namespace std; } - (IBAction)onMore:(UIBarButtonItem *)sender { + MWMTrackIDCollection trackIds = [[MWMBookmarksManager sharedManager] trackIdsForCategory:self.categoryId]; + MWMMarkIDCollection bookmarkdsIds = [[MWMBookmarksManager sharedManager] bookmarkIdsForCategory:self.categoryId]; + auto actionSheet = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet]; - [actionSheet addAction:[UIAlertAction actionWithTitle:L(@"sharing_options") + if (trackIds.count > 0 || bookmarkdsIds.count > 0) { + [actionSheet addAction:[UIAlertAction actionWithTitle:L(@"sharing_options") style:UIAlertActionStyleDefault handler:^(UIAlertAction *_Nonnull action) { [self shareCategory]; [Statistics logEvent:kStatBookmarksListItemSettings withParameters:@{kStatOption: kStatSharingOptions}]; }]]; + } [actionSheet addAction:[UIAlertAction actionWithTitle:L(@"search_show_on_map") style:UIAlertActionStyleDefault