package com.renrenliao.im.ext

import android.view.View
import com.renrenliao.im.bean.UserInfo

/**
 **@ClassName ComExt
 **@Description
 **@Author gan
 **@Date 2022/5/24 17:50
 **/


fun View.click(block: () -> Unit) {
    setOnClickListener {
        block()
    }
}

fun View.visible() {
    visibility = View.VISIBLE
}

fun View.invisible() {
    visibility = View.INVISIBLE
}

fun View.gone() {
    visibility = View.GONE
}

fun isMan(userInfo: UserInfo):Boolean{
    return userInfo.userSex == 1
}