package com.quansu.heifengwuliu.activity

import com.quansu.heifengwuliu.R
import com.quansu.heifengwuliu.adapter.MsgAdapter
import com.quansu.heifengwuliu.base.MBRActivity
import com.quansu.heifengwuliu.databinding.ActivityMsgBinding
import com.quansu.heifengwuliu.utils.net.NetEngine
import com.ysnows.base.base.BRRepository
import com.ysnows.base.base.BRViewModel
import com.ysnows.base.net.IResponse
import io.reactivex.Observable

class MsgActivity : MBRActivity<BRViewModel<BRRepository>, MsgAdapter, ActivityMsgBinding>() {
    override fun binding(): ActivityMsgBinding {
        return ActivityMsgBinding.inflate(layoutInflater)
    }

    override fun initAdapter(): MsgAdapter {
        return MsgAdapter()
    }

    override fun api(): Observable<out IResponse<*>> {
        return NetEngine.service.taskList("", vm?.repository()?.autoPage()!!)
    }

    override fun title(): String? {
        return getString(R.string.msg)
    }
}