show a placeholder if no files are shown at the mimetypes list

This commit is contained in:
tibbi 2021-10-13 22:58:15 +02:00
parent 60ecf44975
commit 3f449cd515
1 changed files with 4 additions and 2 deletions

View File

@ -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<FileDirItem>): ArrayList<ListItem> {