[MAPSME-6941] [ios] Fixed move bookmark to new category.

This commit is contained in:
Ilya Grechuhin 2018-02-26 18:18:12 +03:00 committed by Aleksandr Zatsepin
parent 8e78db485e
commit ea1ec31df2
2 changed files with 7 additions and 3 deletions

View file

@ -80,13 +80,14 @@
- (void)addSetVC:(AddSetVC *)vc didAddSetWithCategoryId:(df::MarkGroupID)categoryId
{
[self moveBookmarkToSetWithCategoryId:categoryId];
[self.tableView reloadData];
[self.delegate didSelectCategory:self.category withCategoryId:categoryId];
}
- (void)moveBookmarkToSetWithCategoryId:(df::MarkGroupID)categoryId
{
m_categoryId = categoryId;
self.category = @(GetFramework().GetBookmarkManager().GetCategoryName(categoryId).c_str());
[self.tableView reloadData];
[self.delegate didSelectCategory:self.category withCategoryId:categoryId];
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath

View file

@ -229,8 +229,11 @@ enum RowInMetaInfo
}
case Category:
{
df::MarkGroupID categoryId = self.cachedNewBookmarkCatId;
if (categoryId == df::kInvalidMarkGroupId)
categoryId = m_cachedBookmarkCatId;
SelectSetVC * svc = [[SelectSetVC alloc] initWithCategory:self.cachedCategory
categoryId:m_cachedBookmarkCatId
categoryId:categoryId
delegate:self];
[self.navigationController pushViewController:svc animated:YES];
break;