Parcourir la source

修改老师端直播间倒计时流程逻辑

Pq il y a 1 an
Parent
commit
1af876f515

+ 1 - 1
tclive/src/main/java/com/daya/tclive/bean/LiveRoomInfoBean.java

@@ -44,7 +44,7 @@ public class LiveRoomInfoBean implements Parcelable {
     public String speakerName;
     public String speakerPic;
     public int subjectId;
-    public String type;
+    public String type;//房间类型 live直播课  temp临时直播间
     private LiveRoomConfigBean liveRoomConfig;
     private String userSig;
     private String os;

+ 5 - 2
tclive/src/main/java/com/daya/tclive/ui/TCTeacherLiveRoomActivity.java

@@ -155,6 +155,8 @@ public class TCTeacherLiveRoomActivity extends BaseMVPActivity<ActivityTcTeacher
     private String subjectId;
     boolean isNeedCountTime = false;
 
+    boolean isLiveCourse = false;
+
     private Handler mHandler = new Handler(Looper.myLooper()) {
         @Override
         public void handleMessage(@NonNull Message msg) {
@@ -296,7 +298,7 @@ public class TCTeacherLiveRoomActivity extends BaseMVPActivity<ActivityTcTeacher
         currentCountType = type;
         if (type == LiveCourseCountTimeHelper.COUNT_TYPE_COURSE) {
             tvCountTimeValue.setTextColor(getResources().getColor(R.color.color_00fff0));
-            tvCountTimeTip.setText("课程时长:");
+            tvCountTimeTip.setText(isLiveCourse ? "课程时长:" : "剩余时长:");
         }
         if (type == LiveCourseCountTimeHelper.COUNT_TYPE_REST) {
             tvCountTimeValue.setTextColor(getResources().getColor(R.color.color_00fff0));
@@ -533,6 +535,7 @@ public class TCTeacherLiveRoomActivity extends BaseMVPActivity<ActivityTcTeacher
             return;
         }
         this.mRoomInfoBean = roomInfoBean;
+        this.isLiveCourse = TextUtils.equals(mRoomInfoBean.type, "live");
         syncAddLikeNum();
         if (mMessageAdapter != null) {
             mMessageAdapter.setRoomAuthorId(roomInfoBean.speakerId);
@@ -1666,7 +1669,7 @@ public class TCTeacherLiveRoomActivity extends BaseMVPActivity<ActivityTcTeacher
 
 
     private boolean isLiveCourse() {
-        return isNeedCountTime;
+        return isLiveCourse;
     }
 
     @Override