Merge pull request #5461 from goblinr/MAPSME-155-ext-gallery-more-button-fix

[android] prevent showing gallery if it has only 5 images
This commit is contained in:
Aleksandr Zatsepin 2017-02-22 10:34:19 +03:00 committed by GitHub
commit 25152748fa

View file

@ -664,7 +664,8 @@ public class PlacePageView extends RelativeLayout
@Override
public void onItemClick(View v, int position)
{
if (position == GalleryAdapter.MAX_COUNT - 1)
if (position == GalleryAdapter.MAX_COUNT - 1
&& mGalleryAdapter.getItems().size() > GalleryAdapter.MAX_COUNT)
{
GalleryActivity.start(getContext(), mGalleryAdapter.getItems(), mMapObject.getTitle());
}