Skip to content
This repository was archived by the owner on Nov 26, 2025. It is now read-only.

Commit bf256cd

Browse files
committed
Added check for positions enabled state in adapter before performing click
1 parent a044762 commit bf256cd

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

library/src/main/java/com/etsy/android/grid/ExtendableListView.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -944,11 +944,13 @@ private boolean onTouchUpTap(final MotionEvent event) {
944944
invalidate();
945945
mPerformClick = new PerformClick();
946946
}
947-
final PerformClick performClick = mPerformClick;
948-
performClick.mClickMotionPosition = mMotionPosition;
949-
performClick.rememberWindowAttachCount();
950-
951-
performClick.run();
947+
final int motionPosition = mMotionPosition;
948+
if (!mDataChanged && mAdapter.isEnabled(motionPosition)) {
949+
final PerformClick performClick = mPerformClick;
950+
performClick.mClickMotionPosition = motionPosition;
951+
performClick.rememberWindowAttachCount();
952+
performClick.run();
953+
}
952954
return true;
953955
}
954956

0 commit comments

Comments
 (0)