fixed npe

This commit is contained in:
Mariotaku Lee 2016-03-18 00:34:02 +08:00
parent 28f68e2ff3
commit 4122992df5
1 changed files with 3 additions and 3 deletions

View File

@ -190,10 +190,10 @@ public abstract class ParcelableStatusesAdapter extends LoadMoreSupportAdapter<R
public void setData(List<ParcelableStatus> data) {
mData = data;
if (!(data instanceof ObjectCursor) && !data.isEmpty()) {
mLastItemFiltered = data.get(data.size() - 1).is_filtered;
} else {
if (data instanceof ObjectCursor || data == null || data.isEmpty()) {
mLastItemFiltered = false;
} else {
mLastItemFiltered = data.get(data.size() - 1).is_filtered;
}
notifyDataSetChanged();
}