fix:修复欢乐砸蛋排行榜数据加载问题(viewpager2导致)
This commit is contained in:
@@ -42,6 +42,7 @@ public class BoxRankingFragment extends BaseMvpFragment<IBoxRankingView, BoxRank
|
||||
private BoxRankingListAdapter mAdapter;
|
||||
private int datetype;
|
||||
|
||||
private boolean isInitiated = false;
|
||||
public static BoxRankingFragment newInstance(int datetype) {
|
||||
Bundle args = new Bundle();
|
||||
args.putInt("datetype", datetype);
|
||||
@@ -81,9 +82,16 @@ public class BoxRankingFragment extends BaseMvpFragment<IBoxRankingView, BoxRank
|
||||
@Override
|
||||
public void initiate() {
|
||||
initRecyclerView();
|
||||
loadData(true, datetype);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
if(!isInitiated){
|
||||
loadData(true, datetype);
|
||||
}
|
||||
isInitiated = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 刷新数据
|
||||
@@ -153,6 +161,7 @@ public class BoxRankingFragment extends BaseMvpFragment<IBoxRankingView, BoxRank
|
||||
if (page <= 1) {
|
||||
showNoData(getString(R.string.empty_data));
|
||||
}
|
||||
mAdapter.loadMoreEnd();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user