Fix crash in groups

This commit is contained in:
PavelRatushny 2017-09-27 14:54:24 +03:00
parent 71338c4809
commit 439830a7f5

View file

@ -281,7 +281,7 @@ public class MapMarkersGroupsAdapter extends RecyclerView.Adapter<RecyclerView.V
}
} else {
boolean firstItemInDisplayGroup = position - 1 != -1 && getItem(position - 1) instanceof Integer;
boolean lastItemInDisplayGroup = !(getItem(position) instanceof MapMarker);
boolean lastItemInDisplayGroup = position == getItemCount() || !(getItem(position) instanceof MapMarker);
if (firstItemInDisplayGroup && lastItemInDisplayGroup) {
items.remove(position - 1);
}