package com.yidianling.user.api.bean

import com.yidianling.user.api.utils.UserApiServiceUtils


/**
 * author : Zhangwenchao
 * e-mail : zhangwch@yidianling.com
 * time   : 2018/04/26
 */
class UserSettingBean {
    //是否开启指纹
    var fingerPrintStatus: Boolean = false
        set(value) {
            if (fingerPrintStatus!=value){
                field = value
                UserApiServiceUtils.provideUserApiService().updateUserSetingSp(this)
            }
        }

    //指纹或手势验证成功时间
    var unLockCheckSuccessTime: Long = 0L
        set(value) {
            if (unLockCheckSuccessTime!=value){
                field = value
                UserApiServiceUtils.provideUserApiService().updateUserSetingSp(this)
            }
        }
    //指纹多次错误被禁止使用的时间戳
    var fingerErrorTime: Long = 0
        set(value) {
            if (fingerErrorTime!=value){
                field = value
                UserApiServiceUtils.provideUserApiService().updateUserSetingSp(this)
            }
        }
    //手势密码
    var gesturePassword: String = ""
        set(value) {
            if (!value.equals(gesturePassword)){
                field = value
                UserApiServiceUtils.provideUserApiService().updateUserSetingSp(this)
            }
        }
    //设置群聊历史记录
    var chatTeamHisShowed: Boolean = false
        set(value) {
            if (chatTeamHisShowed!=value){
                field = value
                UserApiServiceUtils.provideUserApiService().updateUserSetingSp(this)
            }
        }
    //获取动态页面是否提示过安全解锁
    var trendsIsClick: Boolean = false
        set(value) {
            if (trendsIsClick!=value){
                field = value
                UserApiServiceUtils.provideUserApiService().updateUserSetingSp(this)
            }
        }
    //我的页面隐私安全是否点击过
    var meSafePrivateIsClick = false
        set(value) {
            if (meSafePrivateIsClick!=value){
                field = value
                UserApiServiceUtils.provideUserApiService().updateUserSetingSp(this)
            }
        }
    //最后一次登录的版本号
    var lastVersionCode = 0
        set(value) {
            if (lastVersionCode!=value){
                field = value
                UserApiServiceUtils.provideUserApiService().updateUserSetingSp(this)
            }
        }
    /**
     * 消息语音提醒
     */
    var hasVoice: Boolean = true
        set(value) {
            if (hasVoice!=value){
                field = value
                UserApiServiceUtils.provideUserApiService().updateUserSetingSp(this)
            }
        }
    /**
     * 消息震动提醒
     */
    var hasShake: Boolean = true
        set(value) {
            if (hasShake!=value){
                field = value
                UserApiServiceUtils.provideUserApiService().updateUserSetingSp(this)
            }
        }

    var time: Long = 0L
        set(value) {
            if (time!=value){
                field = value
                UserApiServiceUtils.provideUserApiService().updateUserSetingSp(this)
            }
        }
    /**
     * 手机识别吗是否已经提示过
     */
    var phoneStatusPermissionIsShow : Boolean = false
        set(value){
            if (phoneStatusPermissionIsShow!=value){
                field = value
                UserApiServiceUtils.provideUserApiService().updateUserSetingSp(this)
            }
        }
}