[android] Fixed endless progress of the cross promo gallery when there are no promo objects in the current city, which is associated with the MapObject

This commit is contained in:
Dmitry Donskoy 2019-08-09 18:33:36 +03:00 committed by Aleksey Belousov
parent 626f268ac2
commit 8021b66ba1

View file

@ -1246,12 +1246,12 @@ public class PlacePageView extends NestedScrollView
private void processSponsored(@NonNull NetworkPolicy policy)
{
boolean hasPromoGallery = mSponsored != null && mSponsored.getType() == Sponsored.TYPE_PROMO_CATALOG;
toggleCatalogPromoGallery(hasPromoGallery);
if (mSponsored == null || mMapObject == null)
return;
boolean hasPromoGallery = mSponsored.getType() == Sponsored.TYPE_PROMO_CATALOG;
toggleCatalogPromoGallery(hasPromoGallery);
if (hasPromoGallery && policy.canUseNetwork())
{
Promo.INSTANCE.nativeRequestCityGallery(policy, mMapObject.getLat(), mMapObject.getLon(),