Fix swipe in groups
This commit is contained in:
parent
e5bb69053b
commit
75cc6162b7
1 changed files with 3 additions and 2 deletions
|
@ -83,8 +83,9 @@ public class MapMarkersGroupsFragment extends Fragment implements OsmAndCompassL
|
||||||
@Override
|
@Override
|
||||||
public int getSwipeDirs(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder) {
|
public int getSwipeDirs(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder) {
|
||||||
boolean markerViewHolder = viewHolder instanceof MapMarkerItemViewHolder;
|
boolean markerViewHolder = viewHolder instanceof MapMarkerItemViewHolder;
|
||||||
if (markerViewHolder) {
|
int pos = viewHolder.getAdapterPosition();
|
||||||
MapMarker marker = (MapMarker) adapter.getItem(viewHolder.getAdapterPosition());
|
if (markerViewHolder && pos != -1) {
|
||||||
|
MapMarker marker = (MapMarker) adapter.getItem(pos);
|
||||||
if (marker.history) {
|
if (marker.history) {
|
||||||
return ItemTouchHelper.RIGHT;
|
return ItemTouchHelper.RIGHT;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue