package com.base.datarecovery.activity

import android.graphics.Color
import android.icu.util.MeasureUnit
import android.view.View
import androidx.core.view.updatePadding
import androidx.lifecycle.lifecycleScope
import com.base.datarecovery.bean.MediaBean
import com.base.datarecovery.databinding.ActivityRepeatBinding
import com.base.datarecovery.help.BaseActivity
import com.base.datarecovery.help.MediaStoreHelp.getImageMedia
import com.base.datarecovery.utils.BarUtils
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch

class RepeatActivity : BaseActivity<ActivityRepeatBinding>() {


    override val binding: ActivityRepeatBinding by lazy {
        ActivityRepeatBinding.inflate(layoutInflater)
    }


    override fun initView() {
        BarUtils.setStatusBarLightMode(this, true)
        BarUtils.setStatusBarColor(this, Color.TRANSPARENT)
        binding.root.updatePadding(top = BarUtils.getStatusBarHeight())
    }

    fun initData() {
        binding.progressBar.visibility = View.VISIBLE

        lifecycleScope.launch(Dispatchers.IO) {
            val list = arrayListOf<MediaBean>()
            getImageMedia(list)
        }

    }

}