forked from organicmaps/organicmaps
[android] Added unconditional refresing of place page view, when map object is selected, i.e. for the same object refresh will be updated as well
This commit is contained in:
parent
ddd7951e88
commit
be2cccc50e
2 changed files with 2 additions and 10 deletions
|
@ -269,17 +269,8 @@ public class BottomSheetPlacePageController implements PlacePageController, Loca
|
|||
mPlacePage.setMapObject(object, (policy, isSameObject) -> {
|
||||
@AnchorBottomSheetBehavior.State
|
||||
int state = mPlacePageBehavior.getState();
|
||||
// The method openFor could be invoked many times, e.g. when we leave the map and come back
|
||||
// on it. So, we should do nothing if the map object is not changed or place page is already
|
||||
// opened, but we have to refresh place page views, since the map object data could be changed
|
||||
// while we were on the another screen (e.g. editor, ugc, settings, etc.). This behavior is
|
||||
// produced by the framework 'UpdatePlacePageInfoForCurrentSelection' method that in turn calls
|
||||
// method 'ActivateMapSelection'.
|
||||
if (isSameObject && !isHiddenState(state))
|
||||
{
|
||||
mPlacePage.refreshViews(policy);
|
||||
return;
|
||||
}
|
||||
|
||||
mPlacePage.resetScroll();
|
||||
mPlacePage.resetWebView();
|
||||
|
|
|
@ -1008,9 +1008,10 @@ public class PlacePageView extends NestedScrollView
|
|||
if (MapObject.same(mMapObject, mapObject))
|
||||
{
|
||||
mMapObject = mapObject;
|
||||
NetworkPolicy policy = NetworkPolicy.newInstance(NetworkPolicy.getCurrentNetworkUsageStatus());
|
||||
refreshViews(policy);
|
||||
if (listener != null)
|
||||
{
|
||||
NetworkPolicy policy = NetworkPolicy.newInstance(NetworkPolicy.getCurrentNetworkUsageStatus());
|
||||
listener.onSetMapObjectComplete(policy, true);
|
||||
}
|
||||
return;
|
||||
|
|
Loading…
Add table
Reference in a new issue