Skip to content

Commit

Permalink
fix bug #354
Browse files Browse the repository at this point in the history
  • Loading branch information
ChadCym committed Oct 16, 2016
1 parent d91b156 commit 2c07860
Showing 1 changed file with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,8 @@ public void addData(int position, List<T> data) {
*/
public void addData(List<T> newData) {
this.mData.addAll(newData);
if (mNextLoadEnable) {
mLoadingMoreEnable = false;
}
notifyItemRangeChanged(mData.size() - newData.size() + getHeaderLayoutCount(), newData.size());
hiedLoadingMore();
notifyItemRangeInserted(mData.size() - newData.size() + getHeaderLayoutCount(),newData.size());
}

/**
Expand All @@ -284,13 +282,11 @@ public boolean isLoading() {
* same as addData(List<T>) but for when data is manually added to the adapter
*/
public void dataAdded() {
if (mNextLoadEnable) {
mLoadingMoreEnable = false;
}
hiedLoadingMore();
notifyDataSetChanged();
}

public void nextData() {
public void hiedLoadingMore() {
if (mNextLoadEnable) {
mLoadingMoreEnable = false;
}
Expand Down

0 comments on commit 2c07860

Please sign in to comment.