package com.quansu.heifengwuliu.base

import androidx.databinding.ViewDataBinding
import com.quansu.heifengwuliu.activity.LoginActivity
import com.quansu.heifengwuliu.activity.OneLoginActivity
import com.quansu.heifengwuliu.model.User
import com.ysnows.base.base.BActivity
import com.ysnows.base.base.BViewModel
import com.ysnows.base.inter.IUser
import com.ysnows.base.utils.UiSwitch

/**
 * Mine Base Activity
 *
 * @param <VM>
 * @param <B>
</B></VM> */
abstract class MBActivity<VM : BViewModel<*>, B : ViewDataBinding> : BActivity<VM, B>() {
    override fun toLogin() {
        super.toLogin()
//        toast(R.string.please_login)
        UiSwitch.single(context(), OneLoginActivity::class.java)
    }

    override fun user(): IUser? {
        return User.get()
    }

}
