Skip to content

Commit

Permalink
Fixed #126 - onUpdateEmptyView() is not being called in updateDataSet…
Browse files Browse the repository at this point in the history
…() if size > 0
  • Loading branch information
davideas committed Jun 29, 2016
1 parent 80539db commit dd83f11
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -409,13 +409,15 @@ public void updateDataSet(@Nullable List<T> items, boolean animate) {
else mItems = new ArrayList<>(items);
notifyDataSetChanged();
}
//Check if Data Set is empty
if (mUpdateListener != null && getItemCount() == 0) {
mUpdateListener.onUpdateEmptyView(0);
} else {
//Show headers and expanded items if Data Set not empty
if (getItemCount() > 0) {
expandItemsAtStartUp();
if (headersShown) showAllHeaders();
}
//Update empty view
if (mUpdateListener != null) {
mUpdateListener.onUpdateEmptyView(getItemCount());
}
}

/**
Expand Down

0 comments on commit dd83f11

Please sign in to comment.