罗明文
昨天 442124baa483f8d1c4aaca7ff81e15dd3f122363
app/src/main/java/com/dollearn/student/ui/home/DailyFragment.kt
@@ -35,9 +35,7 @@
    private val week by lazy {
        (requireActivity() as ScheduleActivity).week
    }
    private val current by lazy {
        (requireActivity() as ScheduleActivity).currentDay
    }
    override fun onFirstVisibleToUser() {
        getProgress()
@@ -113,13 +111,17 @@
    private fun getProgress(){
        HttpManager.studySchedule(week,day).requestByF(this){ _, data->
            data?.apply {
                val scheduleActivity = activity as ScheduleActivity
                if (day != scheduleActivity.currentDay){ //解锁了后一天
                    scheduleActivity.unLockNext(day)
                }
                tv_current.text = "当前周目:${week.formatToChinese()}周目"
                tv_progress.text = "${computeSchedule}%"
                tv_total.text = "${totalStudy}小时"
                tv_today.text = "${todayStudy}小时"
                progress_bar.progress = computeSchedule
                if (this@DailyFragment.day == current){
                if (this@DailyFragment.day == scheduleActivity.currentDay){
                    formatProgress(listen,tv_state)
                    formatProgress(look,tv_state_2)
                    formatProgress(induction,tv_state_3)