package com.rdiot.yx485.ui.mine

import android.os.Bundle
import com.gyf.immersionbar.ktx.immersionBar
import com.king.zxing.util.LogUtils
import com.rdiot.yx485.BuildConfig
import com.rdiot.yx485.R
import com.rdiot.yx485.base.BaseActivity
import com.rdiot.yx485.base.LocalData
import com.rdiot.yx485.databinding.ActSettingBinding
import com.rdiot.yx485.util.checkUpdate
import com.rdiot.yx485.util.setClickLimitListener

/**
 * 系统设置
 * @author mR2hao
 * @date 2023/2/1
 */
class SettingActivity : BaseActivity<ActSettingBinding>() {
    override fun getLayoutId() = R.layout.act_setting

    override fun initView(savedInstanceState: Bundle?) {
        immersionBar {
            statusBarView(binding.v)
            statusBarColor(R.color.transparent)
            navigationBarColor(R.color.white)
            statusBarDarkFont(true)
        }

        binding.nb.setLeftClickListener {
            finish()
        }

        binding.llUpdate.setClickLimitListener {
            checkUpdate(LocalData.appVersionData.value, true)
        }

        binding.ver = BuildConfig.VERSION_NAME

    }
}

