|
@@ -136,6 +136,7 @@ public class HomeCardFragment extends BaseMVPFragment<FgHomeCardLayoutBinding, H
|
|
|
}
|
|
|
|
|
|
private int currentStatus = -1;
|
|
|
+ private ArrayList<HomePageType> currentPageTypeList;
|
|
|
|
|
|
private void load(HomeAlbumListBean data) {
|
|
|
int tenantAlbumStatus = data.getTenantAlbumStatus();
|
|
@@ -155,6 +156,7 @@ public class HomeCardFragment extends BaseMVPFragment<FgHomeCardLayoutBinding, H
|
|
|
if (!isNeedRefresh(tenantAlbumStatus, pageList)) {
|
|
|
return;
|
|
|
}
|
|
|
+ this.currentPageTypeList = pageList;
|
|
|
|
|
|
ArrayList<Fragment> list = new ArrayList<>();
|
|
|
for (int i = 0; i < pageList.size(); i++) {
|
|
@@ -172,6 +174,16 @@ public class HomeCardFragment extends BaseMVPFragment<FgHomeCardLayoutBinding, H
|
|
|
if (mCardPageAdapter.getItemCount() != pageList.size() || currentStatus != status) {
|
|
|
return true;
|
|
|
}
|
|
|
+ //优化刷新判断逻辑
|
|
|
+ if (currentPageTypeList != null && currentPageTypeList.size() == pageList.size()) {
|
|
|
+ for (int i = 0; i < currentPageTypeList.size(); i++) {
|
|
|
+ HomePageType homePageType = currentPageTypeList.get(i);
|
|
|
+ HomePageType homePageType2 = pageList.get(i);
|
|
|
+ if (homePageType != homePageType2) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
return false;
|
|
|
}
|
|
|
|