[ios] delete 'export as file' option for shared categories

This commit is contained in:
o.bolovintseva 2018-11-29 17:18:17 +03:00 committed by Olesia Bolovintseva
parent 12df5fe344
commit c818aac440
2 changed files with 19 additions and 13 deletions

View file

@ -464,13 +464,16 @@ CGFloat const kPinDiameter = 18.0f;
[Statistics logEvent:kStatBookmarksListItemMoreClick withParameters:@{kStatOption : kStatSettings}];
}]];
[actionSheet addAction:[UIAlertAction actionWithTitle:L(@"export_file")
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * _Nonnull action)
{
[self exportFile];
[Statistics logEvent:kStatBookmarksListItemMoreClick withParameters:@{kStatOption : kStatSendAsFile}];
}]];
if (![[MWMBookmarksManager sharedManager] isCategoryFromCatalog:self->m_categoryId])
{
[actionSheet addAction:[UIAlertAction actionWithTitle:L(@"export_file")
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * _Nonnull action)
{
[self exportFile];
[Statistics logEvent:kStatBookmarksListItemMoreClick withParameters:@{kStatOption : kStatSendAsFile}];
}]];
}
auto deleteAction = [UIAlertAction actionWithTitle:L(@"delete_list")
style:UIAlertActionStyleDestructive

View file

@ -135,12 +135,15 @@ final class BMCViewController: MWMViewController {
Statistics.logEvent(kStatBookmarksListSettingsClick,
withParameters: [kStatOption : kStatMakeInvisibleOnMap])
}))
let exportFile = L("export_file")
actionSheet.addAction(UIAlertAction(title: exportFile, style: .default, handler: { _ in
self.shareCategoryFile(category: category, anchor: anchor)
Statistics.logEvent(kStatBookmarksListSettingsClick,
withParameters: [kStatOption : kStatSendAsFile])
}))
if (!MWMBookmarksManager.shared().isCategory(fromCatalog: category.identifier))
{
let exportFile = L("export_file")
actionSheet.addAction(UIAlertAction(title: exportFile, style: .default, handler: { _ in
self.shareCategoryFile(category: category, anchor: anchor)
Statistics.logEvent(kStatBookmarksListSettingsClick,
withParameters: [kStatOption : kStatSendAsFile])
}))
}
let share = L("sharing_options")
let shareAction = UIAlertAction(title: share, style: .default, handler: { _ in
self.shareCategory(category: category, anchor: anchor)