Bladeren bron

修改学生端我的课程小组课提示

Pq 8 maanden geleden
bovenliggende
commit
2d099c4ef8

+ 1 - 4
student/src/main/java/com/cooleshow/student/adapter/GroupCourseListAdapter.java

@@ -55,28 +55,25 @@ public class GroupCourseListAdapter extends BaseQuickAdapter<LiveCourseListBean.
         courseIntroduce = StringUtils.replaceSpace(courseIntroduce);
         holder.setText(R.id.tv_des, courseIntroduce);
 
-        String tip = "";
         TextView tvCourseStatusBt = holder.getView(R.id.tv_course_status);
         if (TextUtils.equals(CourseConstants.COURSE_STATUS_NOT_START, data.status)) {
             //未开始
             holder.setText(R.id.tv_course_status, CourseGroupStatusType.NOT_START.getValue());
             tvCourseStatusBt.setTextColor(getContext().getResources().getColor(com.cooleshow.base.R.color.color_ff802c));
-            tip = String.format("剩余%d个名额", data.getMaxStudentNum() - data.getStudentCount());
         }
 
         if (TextUtils.equals(CourseConstants.COURSE_STATUS_ING, data.status)) {
             //进行中
             holder.setText(R.id.tv_course_status, CourseGroupStatusType.ING.getValue());
             tvCourseStatusBt.setTextColor(getContext().getResources().getColor(com.cooleshow.base.R.color.color_2dc7aa));
-            tip = UiUtils.getBuyNumTip2("", String.valueOf(data.studentCount));
         }
 
         if (TextUtils.equals(CourseConstants.COURSE_STATUS_COMPLETE, data.status)) {
             //已结束
             holder.setText(R.id.tv_course_status, CourseGroupStatusType.COMPLETE.getValue());
             tvCourseStatusBt.setTextColor(getContext().getResources().getColor(com.cooleshow.base.R.color.color_999999));
-            tip = UiUtils.getBuyNumTip2("", String.valueOf(data.studentCount));
         }
+        String tip = UiUtils.getBuyNumTip2("", String.valueOf(data.studentCount));
         //购买人数
         holder.setText(R.id.tv_buy_num, tip);
 

+ 1 - 4
teacher/src/main/java/com/cooleshow/teacher/adapter/MineGroupCourseListAdapter.java

@@ -49,27 +49,24 @@ public class MineGroupCourseListAdapter extends BaseQuickAdapter<LiveCourseListB
         holder.setText(R.id.tv_des, courseIntroduce);
 
         TextView tvCourseStatusBt = holder.getView(R.id.tv_course_status);
-        String tip = "";
         if (TextUtils.equals(CourseConstants.COURSE_STATUS_NOT_START, data.status)) {
             //未开始
             holder.setText(R.id.tv_course_status, CourseGroupStatusType.NOT_START.getValue());
             tvCourseStatusBt.setTextColor(getContext().getResources().getColor(com.cooleshow.base.R.color.color_ff802c));
-            tip = String.format("剩余%d个名额", data.getMaxStudentNum() - data.getStudentCount());
         }
 
         if (TextUtils.equals(CourseConstants.COURSE_STATUS_ING, data.status)) {
             //进行中
             holder.setText(R.id.tv_course_status, CourseGroupStatusType.ING.getValue());
             tvCourseStatusBt.setTextColor(getContext().getResources().getColor(com.cooleshow.base.R.color.color_2dc7aa));
-            tip = UiUtils.getBuyNumTip2("", String.valueOf(data.studentCount));
         }
 
         if (TextUtils.equals(CourseConstants.COURSE_STATUS_COMPLETE, data.status)) {
             //已结束
             holder.setText(R.id.tv_course_status, CourseGroupStatusType.COMPLETE.getValue());
             tvCourseStatusBt.setTextColor(getContext().getResources().getColor(com.cooleshow.base.R.color.color_999999));
-            tip = UiUtils.getBuyNumTip2("", String.valueOf(data.studentCount));
         }
+        String tip = UiUtils.getBuyNumTip2("", String.valueOf(data.studentCount));
         //购买人数
         holder.setText(R.id.tv_buy_num, tip);