Skip to content

Commit d296d1f

Browse files
authored
Merge pull request CymChad#1624 from inRush/master
fix expand bug
2 parents f7bc528 + 822c3b3 commit d296d1f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/src/main/java/com/chad/library/adapter/base/BaseQuickAdapter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1593,7 +1593,7 @@ public long getItemId(int position) {
15931593

15941594
@SuppressWarnings("unchecked")
15951595
private int recursiveExpand(int position, @NonNull List list) {
1596-
int count = 0;
1596+
int count = list.size();
15971597
int pos = position + list.size() - 1;
15981598
for (int i = list.size() - 1; i >= 0; i--, pos--) {
15991599
if (list.get(i) instanceof IExpandable) {
@@ -1639,7 +1639,7 @@ public int expand(@IntRange(from = 0) int position, boolean animate, boolean sho
16391639
subItemCount += recursiveExpand(position + 1, list);
16401640

16411641
expandable.setExpanded(true);
1642-
subItemCount += list.size();
1642+
// subItemCount += list.size();
16431643
}
16441644
int parentPos = position + getHeaderLayoutCount();
16451645
if (shouldNotify) {

0 commit comments

Comments
 (0)