Skip to content

Commit

Permalink
fix:修复搜索偶发崩溃
Browse files Browse the repository at this point in the history
  • Loading branch information
goweii committed Feb 18, 2022
1 parent 8f2216a commit 37a0e6d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public void searchSuccess(int code, ArticleListBean data) {
mAdapter.setNewData(data.getDatas());
mAdapter.setEnableLoadMore(true);
if (data.getDatas() == null || data.getDatas().isEmpty()) {
MultiStateUtils.toEmpty(msv);
MultiStateUtils.toEmpty(msv, true);
} else {
MultiStateUtils.toContent(msv);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ public void setOnItemChildViewClickListener(OnItemChildViewClickListener onItemC

@Override
public void setNewData(@Nullable List<ArticleBean> data) {
setNewData(data, true);
if (data == null || data.isEmpty()) {
setNewData(null, false);
} else {
setNewData(data, true);
}
}

public void setNewData(@Nullable List<ArticleBean> data, boolean useDiff) {
Expand Down

0 comments on commit 37a0e6d

Please sign in to comment.