|
@@ -99,22 +99,17 @@ public class TalentStyleFragment extends BaseFragment<FragmentHomeTalentLayoutBi
|
|
|
|
|
|
public void setData(int page, HomeStyleBean data) {
|
|
|
if (mTalentStyleAdapter != null) {
|
|
|
- if (data == null) {
|
|
|
- mTalentStyleAdapter.getData().clear();
|
|
|
- mTalentStyleAdapter.notifyDataSetChanged();
|
|
|
- return;
|
|
|
- }
|
|
|
if (page == 1) {
|
|
|
mTalentStyleAdapter.getData().clear();
|
|
|
mTalentStyleAdapter.notifyDataSetChanged();
|
|
|
- if (data.rows != null && data.rows.size() > 0) {
|
|
|
+ if (data != null && data.rows != null && data.rows.size() > 0) {
|
|
|
checkHasNext(data.rows.size());
|
|
|
mTalentStyleAdapter.setNewInstance(data.rows);
|
|
|
} else {
|
|
|
//showEmpty
|
|
|
}
|
|
|
} else {
|
|
|
- if (data.rows != null && data.rows.size() > 0) {
|
|
|
+ if (data != null && data.rows != null && data.rows.size() > 0) {
|
|
|
mTalentStyleAdapter.getLoadMoreModule().loadMoreComplete();
|
|
|
checkHasNext(data.rows.size());
|
|
|
mTalentStyleAdapter.addData(data.rows);
|