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.BFragment
import com.ysnows.base.base.BViewModel
import com.ysnows.base.inter.IUser
import com.ysnows.base.utils.UiSwitch

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

    }

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