[editor] 'discard' and 'delete' buttons only available when nothing was uploaded to OSM

Signed-off-by: map-per <map-per@gmx.de>
This commit is contained in:
map-per
2025-12-17 18:00:58 +01:00
committed by map-per
parent 4f2b479b2c
commit 26bad5dffb
8 changed files with 29 additions and 23 deletions

View File

@@ -158,7 +158,7 @@ void registerCellsForTableView(std::vector<MWMEditorCellID> const & cells, UITab
[self configNavBar];
auto const & fid = m_mapObject.GetID();
self.featureStatus = osm::Editor::Instance().GetFeatureStatus(fid.m_mwmId, fid.m_index);
self.isFeatureUploaded = osm::Editor::Instance().IsFeatureUploaded(fid.m_mwmId, fid.m_index);
self.isFeatureUploaded = osm::Editor::Instance().AreSomeFeatureChangesUploaded(fid.m_mwmId, fid.m_index);
m_newAdditionalLanguages.clear();
if (self.isCreating)
{
@@ -1089,7 +1089,7 @@ void registerCellsForTableView(std::vector<MWMEditorCellID> const & cells, UITab
- (void)tapOnButtonCell:(UITableViewCell *)cell
{
auto const & fid = m_mapObject.GetID();
self.isFeatureUploaded = osm::Editor::Instance().IsFeatureUploaded(fid.m_mwmId, fid.m_index);
self.isFeatureUploaded = osm::Editor::Instance().AreSomeFeatureChangesUploaded(fid.m_mwmId, fid.m_index);
NSIndexPath * ip = [self.tableView indexPathForCell:cell];
[self.tableView reloadRowsAtIndexPaths:@[ ip ] withRowAnimation:UITableViewRowAnimationFade];