diff --git a/android/src/com/mapswithme/maps/ugc/UGCController.java b/android/src/com/mapswithme/maps/ugc/UGCController.java index 1f247c1ba3..a56ec88edf 100644 --- a/android/src/com/mapswithme/maps/ugc/UGCController.java +++ b/android/src/com/mapswithme/maps/ugc/UGCController.java @@ -146,6 +146,7 @@ public class UGCController implements View.OnClickListener, UGC.UGCListener public void clear() { + UiUtils.hide(mUgcRootView, mLeaveReviewButton, mPreviewUgcInfoView); mUGCReviewAdapter.setItems(new ArrayList()); mUGCRatingRecordsAdapter.setItems(new ArrayList()); mUGCUserRatingRecordsAdapter.setItems(new ArrayList()); @@ -179,16 +180,11 @@ public class UGCController implements View.OnClickListener, UGC.UGCListener public void getUGC(@NonNull MapObject mapObject) { + if (!mapObject.shouldShowUGC()) + return; + mMapObject = mapObject; - if (mapObject.shouldShowUGC()) - { - UiUtils.show(mUgcRootView); - UGC.requestUGC(mMapObject.getFeatureId()); - } - else - { - UiUtils.hide(mUgcRootView); - } + UGC.requestUGC(mMapObject.getFeatureId()); } public boolean isLeaveReviewButtonTouched(@NonNull MotionEvent event) @@ -200,6 +196,7 @@ public class UGCController implements View.OnClickListener, UGC.UGCListener public void onUGCReceived(@Nullable UGC ugc, @Nullable UGCUpdate ugcUpdate, @UGC.Impress int impress, @NonNull String rating) { + UiUtils.show(mUgcRootView); UiUtils.showIf(ugc != null || canUserRate(ugcUpdate) || ugcUpdate != null, mPreviewUgcInfoView); UiUtils.showIf(canUserRate(ugcUpdate), mLeaveReviewButton, mUgcAddRatingView); UiUtils.showIf(ugc != null, mSummaryRootView, mUgcMoreReviews); diff --git a/android/src/com/mapswithme/maps/widget/placepage/PlacePageView.java b/android/src/com/mapswithme/maps/widget/placepage/PlacePageView.java index bb380e2930..ae218936e9 100644 --- a/android/src/com/mapswithme/maps/widget/placepage/PlacePageView.java +++ b/android/src/com/mapswithme/maps/widget/placepage/PlacePageView.java @@ -1481,8 +1481,7 @@ public class PlacePageView extends RelativeLayout mTvSponsoredPrice.setText(mSponsoredPrice); UiUtils.showIf(!isPriceEmpty, mTvSponsoredPrice); UiUtils.showIf((!isRatingEmpty || !isPriceEmpty) && - mSponsored.getType() != Sponsored.TYPE_THOR && - mSponsored.getType() != Sponsored.TYPE_HALLOWEEN, mPreviewRatingInfo); + mSponsored.getType() == Sponsored.TYPE_BOOKING, mPreviewRatingInfo); } }