forked from organicmaps/organicmaps
[android] set country for existing map object
This commit is contained in:
parent
a82d5c692a
commit
4b329eff17
1 changed files with 12 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue