From 3f449cd515ca24fd81dba694caef9ea5ba956372 Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 13 Oct 2021 22:58:15 +0200 Subject: [PATCH] show a placeholder if no files are shown at the mimetypes list --- .../filemanager/pro/activities/MimeTypesActivity.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/MimeTypesActivity.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/MimeTypesActivity.kt index cf5aba49..6d89e220 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/MimeTypesActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/MimeTypesActivity.kt @@ -132,7 +132,7 @@ class MimeTypesActivity : SimpleActivity(), ItemOperationsListener { searchText.isEmpty() -> { mimetypes_list.beVisible() getRecyclerAdapter()?.updateItems(storedItems) - mimetypes_placeholder.beGone() + mimetypes_placeholder.beGoneIf(storedItems.isNotEmpty()) mimetypes_placeholder_2.beGone() } searchText.length == 1 -> { @@ -233,7 +233,7 @@ class MimeTypesActivity : SimpleActivity(), ItemOperationsListener { lastSearchedText = "" mimetypes_list.beVisible() - mimetypes_placeholder.beGone() + mimetypes_placeholder.beGoneIf(storedItems.isNotEmpty()) mimetypes_placeholder_2.beGone() } @@ -338,6 +338,8 @@ class MimeTypesActivity : SimpleActivity(), ItemOperationsListener { val listItem = getRecyclerAdapter()?.listItems?.getOrNull(it) items_fastscroller.updateBubbleText(listItem?.getBubbleText(this, dateFormat, timeFormat) ?: "") } + + mimetypes_placeholder.beVisibleIf(items.isEmpty()) } private fun getListItemsFromFileDirItems(fileDirItems: ArrayList): ArrayList {