[ios] return of "export file" option for all My categories

This commit is contained in:
o.bolovintseva 2018-11-30 16:42:39 +03:00 committed by Olesia Bolovintseva
parent 2a495df02f
commit d13e77081d
2 changed files with 13 additions and 19 deletions

View file

@ -464,16 +464,13 @@ CGFloat const kPinDiameter = 18.0f;
[Statistics logEvent:kStatBookmarksListItemMoreClick withParameters:@{kStatOption : kStatSettings}];
}]];
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}];
}]];
}
[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,15 +135,12 @@ final class BMCViewController: MWMViewController {
Statistics.logEvent(kStatBookmarksListSettingsClick,
withParameters: [kStatOption : kStatMakeInvisibleOnMap])
}))
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 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)