Skip to content

Commit

Permalink
fix removeData()
Browse files Browse the repository at this point in the history
  • Loading branch information
youlookwhat committed Jun 9, 2023
1 parent c7cc72f commit ad5e59b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ out/
# Gradle files
.gradle/
build/
.idea/

# Local configuration file (sdk path, etc)
local.properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public void removeData(@IntRange(from = 0) int position) {
notifyItemRemoved(internalPosition);
// 如果移除的是最后一个,忽略
if (position != mData.size()) {
notifyItemRangeChanged(internalPosition, mData.size() - internalPosition);
notifyItemRangeChanged(internalPosition, mData.size() - position);
}
}
}
Expand Down

0 comments on commit ad5e59b

Please sign in to comment.