Commit 6a16b6b4 authored by wanglei's avatar wanglei

...

parent 6215f869
......@@ -68,7 +68,7 @@ class WhatsAppCleanerActivity : BaseActivity<ActivityWhatsAppCleanerBinding>() {
if (file.name == "WhatsApp Video") {
LogEx.logDebug(TAG, "whatsapp file=${file.absolutePath}")
val bean = list.find { it.tittle == "Image Messages" }
val bean = list.find { it.tittle == "Video Messages" }
val subFile = getDirFiles(file).filter { isVideo(it) }
val size = subFile.sumOf { it.length() }
bean?.size = size
......
......@@ -40,10 +40,12 @@ class WhatsAppCleanerAdapter(val click: (bean: WhatsAppCleanerBean) -> Unit) : R
val context = holder.itemView.context
val bean = beanList[position]
binding.iv.setImageDrawable(ContextCompat.getDrawable(context, bean.icon))
binding.tvTitle.text = bean.tittle
if (bean.subFile.isEmpty()) {
binding.llIv.visibility = View.GONE
binding.tvSize.setTextColor(Color.parseColor("#999999"))
binding.ivArrow.setImageDrawable(ContextCompat.getDrawable(context, R.mipmap.jianotu_whatsapp))
binding.tvNoMessage.visibility = View.VISIBLE
} else {
binding.llIv.visibility = View.VISIBLE
runCatching {
......@@ -60,6 +62,7 @@ class WhatsAppCleanerAdapter(val click: (bean: WhatsAppCleanerBean) -> Unit) : R
binding.tvSize.setTextColor(Color.parseColor("#355BEA"))
binding.tvSize.text = bean.size.toFormatSize()
binding.ivArrow.setImageDrawable(ContextCompat.getDrawable(context, R.mipmap.jianotul_whatsapp))
binding.tvNoMessage.visibility = View.GONE
}
binding.root.setOnClickListener {
if (bean.subFile.isEmpty()) {
......
......@@ -28,6 +28,7 @@
android:orientation="vertical">
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Video Messages"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment