lmw
2024-07-16 c303346ae803dc2a89ec0f025192773211861915
app/src/main/java/com/dollearn/student/ui/home/IncludeActivity.kt
@@ -18,7 +18,10 @@
import com.dollearn.student.network.entity.SubjectBean
import com.dollearn.student.network.request
import com.dollearn.student.ui.TransparentStatusBarActivity
import com.dollearn.student.utils.Const
import com.dollearn.student.utils.event.EmptyEvent
import kotlinx.android.synthetic.main.activity_listen.*
import org.greenrobot.eventbus.EventBus
class IncludeActivity:TransparentStatusBarActivity() {
    override fun setContentView() = R.layout.activity_listen
@@ -130,9 +133,6 @@
        tipDialog.arguments = bundleOf("msg" to "未完成全部答题,确认退出吗?")
        tipDialog.setCallback(object :TipDialog.OnClickCallback{
            override fun onOk() {
                if (view_pager.currentItem == 0)
                    finish()
                else{
                    val list = (data?.subjectList?.subList(0,view_pager.currentItem))
                    val arrayListOf = arrayListOf<Subject>()
                    list?.forEach { it ->
@@ -146,7 +146,6 @@
                        finish()
                    }
                }
            }
            override fun onCancel() {
            }
@@ -156,6 +155,7 @@
    override fun onDestroy() {
        super.onDestroy()
        EventBus.getDefault().post(EmptyEvent(Const.EventCode.STOP_TIMER))
        handler?.removeMessages(0)
        handler = null
    }