[android] set country for existing map object

This commit is contained in:
Alexey Osminin 2020-11-02 16:04:43 +03:00 committed by Alexander Boriskov
parent a82d5c692a
commit 4b329eff17

View file

@ -1164,6 +1164,8 @@ public class PlacePageView extends NestedScrollViewClickFixed
{
listener.onSetMapObjectComplete(policy, true);
}
detachCountry();
setCurrentCountry();
return;
}
@ -1203,13 +1205,20 @@ public class PlacePageView extends NestedScrollViewClickFixed
initEditMapObjectBtn();
mUgcController.clearViewsFor(mMapObject);
String country = MapManager.nativeGetSelectedCountry();
if (country != null && !RoutingController.get().isNavigating())
attachCountry(country);
setCurrentCountry();
}
refreshViews(policy);
}
private void setCurrentCountry()
{
if (mCurrentCountry != null)
throw new AssertionError("country should be detached before!");
String country = MapManager.nativeGetSelectedCountry();
if (country != null && !RoutingController.get().isNavigating())
attachCountry(country);
}
private void processSponsored(@NonNull NetworkPolicy policy)
{
if (mSponsored == null || mMapObject == null)