|
@@ -42,6 +42,12 @@ public class LiveListFragment extends BaseMVPFragment<FragmentLiveListOnLayoutBi
|
|
private boolean hasNext = true;
|
|
private boolean hasNext = true;
|
|
private EmptyViewLayout mEmptyView;
|
|
private EmptyViewLayout mEmptyView;
|
|
private LivePlaybackDialog mLivePlaybackDialog;
|
|
private LivePlaybackDialog mLivePlaybackDialog;
|
|
|
|
+ private Runnable refreshRunnable = new Runnable() {
|
|
|
|
+ @Override
|
|
|
|
+ public void run() {
|
|
|
|
+ getData(true);
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
|
|
public static LiveListFragment newInstance(String liveStatusTag) {
|
|
public static LiveListFragment newInstance(String liveStatusTag) {
|
|
Bundle args = new Bundle();
|
|
Bundle args = new Bundle();
|
|
@@ -120,7 +126,9 @@ public class LiveListFragment extends BaseMVPFragment<FragmentLiveListOnLayoutBi
|
|
@Override
|
|
@Override
|
|
public void onResume() {
|
|
public void onResume() {
|
|
super.onResume();
|
|
super.onResume();
|
|
- getData(true);
|
|
|
|
|
|
+ if (mViewBinding.recyclerView != null) {
|
|
|
|
+ mViewBinding.recyclerView.postDelayed(refreshRunnable, 100);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
private void showPlayBackDialog(ArrayList<LivePlayBackDataBean> datas) {
|
|
private void showPlayBackDialog(ArrayList<LivePlayBackDataBean> datas) {
|
|
@@ -213,4 +221,12 @@ public class LiveListFragment extends BaseMVPFragment<FragmentLiveListOnLayoutBi
|
|
private void checkHasNext(int dataSize) {
|
|
private void checkHasNext(int dataSize) {
|
|
hasNext = dataSize >= Constants.DEFAULT_DATA_SIZE;
|
|
hasNext = dataSize >= Constants.DEFAULT_DATA_SIZE;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public void onDestroy() {
|
|
|
|
+ if (mViewBinding.recyclerView != null && refreshRunnable != null) {
|
|
|
|
+ mViewBinding.recyclerView.removeCallbacks(refreshRunnable);
|
|
|
|
+ }
|
|
|
|
+ super.onDestroy();
|
|
|
|
+ }
|
|
}
|
|
}
|