|
@@ -27,6 +27,7 @@ import com.cooleshow.teacher.bean.TeacherUserInfo;
|
|
import com.cooleshow.teacher.contract.MineLiveCourseContract;
|
|
import com.cooleshow.teacher.contract.MineLiveCourseContract;
|
|
import com.cooleshow.teacher.databinding.FragmentMineLiveCourseBinding;
|
|
import com.cooleshow.teacher.databinding.FragmentMineLiveCourseBinding;
|
|
import com.cooleshow.teacher.presenter.course.MineLiveCoursePresenter;
|
|
import com.cooleshow.teacher.presenter.course.MineLiveCoursePresenter;
|
|
|
|
+import com.cooleshow.usercenter.helper.UserHelper;
|
|
import com.scwang.smart.refresh.layout.api.RefreshLayout;
|
|
import com.scwang.smart.refresh.layout.api.RefreshLayout;
|
|
import com.scwang.smart.refresh.layout.listener.OnRefreshListener;
|
|
import com.scwang.smart.refresh.layout.listener.OnRefreshListener;
|
|
|
|
|
|
@@ -118,7 +119,6 @@ public class MineLiveCourseFragment extends BaseMVPFragment<FragmentMineLiveCour
|
|
|
|
|
|
@Override
|
|
@Override
|
|
protected void initData() {
|
|
protected void initData() {
|
|
- presenter.getTeacherUserInfo();
|
|
|
|
mViewBinding.refreshLayout.setOnRefreshListener(refreshLayout -> {
|
|
mViewBinding.refreshLayout.setOnRefreshListener(refreshLayout -> {
|
|
currentPage = 1;
|
|
currentPage = 1;
|
|
queryCourse(true);
|
|
queryCourse(true);
|
|
@@ -135,6 +135,12 @@ public class MineLiveCourseFragment extends BaseMVPFragment<FragmentMineLiveCour
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
+ public void onResume() {
|
|
|
|
+ super.onResume();
|
|
|
|
+ presenter.getTeacherUserInfo();
|
|
|
|
+ }
|
|
|
|
+
|
|
private boolean hasNext = true;
|
|
private boolean hasNext = true;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -196,9 +202,9 @@ public class MineLiveCourseFragment extends BaseMVPFragment<FragmentMineLiveCour
|
|
@Override
|
|
@Override
|
|
public void setUserVisibleHint(boolean isVisibleToUser) {
|
|
public void setUserVisibleHint(boolean isVisibleToUser) {
|
|
super.setUserVisibleHint(isVisibleToUser);
|
|
super.setUserVisibleHint(isVisibleToUser);
|
|
- if (isVisibleToUser && presenter != null) {
|
|
|
|
- presenter.getTeacherUserInfo();
|
|
|
|
- }
|
|
|
|
|
|
+// if (isVisibleToUser && presenter != null) {
|
|
|
|
+// presenter.getTeacherUserInfo();
|
|
|
|
+// }
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -211,6 +217,7 @@ public class MineLiveCourseFragment extends BaseMVPFragment<FragmentMineLiveCour
|
|
mViewBinding.tvOpen.setVisibility(View.GONE);
|
|
mViewBinding.tvOpen.setVisibility(View.GONE);
|
|
} else if (TextUtils.equals(teacherUserInfo.entryStatus, TeacherInfoConstants.ENTRY_STATUS_PASS)) {
|
|
} else if (TextUtils.equals(teacherUserInfo.entryStatus, TeacherInfoConstants.ENTRY_STATUS_PASS)) {
|
|
//入驻审核通过
|
|
//入驻审核通过
|
|
|
|
+ UserHelper.saveTeacherOpenLiveFlag(teacherUserInfo.liveFlag);
|
|
if (teacherUserInfo.liveFlag == 0) {
|
|
if (teacherUserInfo.liveFlag == 0) {
|
|
//是否有直播权限 0 否 1 是
|
|
//是否有直播权限 0 否 1 是
|
|
mViewBinding.refreshLayout.setVisibility(View.GONE);
|
|
mViewBinding.refreshLayout.setVisibility(View.GONE);
|