package com.sixin.module_p.ui.user.message

import android.content.Context
import android.content.Intent
import android.os.Bundle
import com.lukouguoji.module_base.ktx.getLifecycleOwner
import com.sixin.module_p.R
import com.sixin.module_p.base.BasePdaActivity
import com.sixin.module_p.databinding.ActivityPdaMessageBinding

class PdaMessageListActivity :
    BasePdaActivity<ActivityPdaMessageBinding, PdaMessageListViewModel>() {

    override fun layoutId(): Int {
        return R.layout.activity_pda_message
    }

    override fun viewModelClass(): Class<PdaMessageListViewModel> {
        return PdaMessageListViewModel::class.java
    }

    override fun initOnCreate(savedInstanceState: Bundle?) {
        setBackArrow("我的消息")
        binding.viewModel = viewModel

        viewModel.pageModel.bindSmartRefreshLayout(
            binding.srl,
            binding.rv,
            viewModel,
            getLifecycleOwner()
        )

        viewModel.refresh()
    }

    companion object {
        @JvmStatic
        fun start(context: Context) {
            val starter = Intent(context, PdaMessageListActivity::class.java)
            context.startActivity(starter)
        }
    }

}