[ios] Log error during the track editing instead of failing

The bug is quite rare and happens when the user taps on the edit (pencil) button on the PlacePage. It seems like the tap happens during the PP data object reloading the and the object type has changed. It is better to avoid failing in such cases because we cannot prevent user interaction during the pp reloading.

Signed-off-by: Kiryl Kaveryn <kirylkaveryn@gmail.com>
This commit is contained in:
Kiryl Kaveryn
2025-07-30 18:34:43 +04:00
committed by Yannik Bloscheck
parent aac80606f2
commit ef2dea20fe

View File

@@ -225,9 +225,11 @@ using namespace storage;
[[MapViewController sharedController].navigationController pushViewController:editBookmarkController animated:YES];
}
- (void)editTrack:(PlacePageData *)data {
if (data.objectType != PlacePageObjectTypeTrack) {
ASSERT_FAIL("editTrack called for non-track object");
- (void)editTrack:(PlacePageData *)data
{
if (data.objectType != PlacePageObjectTypeTrack)
{
LOG(LERROR, ("editTrack called for non-track object"));
return;
}
EditTrackViewController * editTrackController = [[EditTrackViewController alloc] initWithTrackId:data.trackData.trackId editCompletion:^(BOOL edited) {