mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-23 04:57:59 +01:00
show a placeholder text if search gives no results
This commit is contained in:
parent
dfe362b4cd
commit
58ba160571
1 changed files with 7 additions and 0 deletions
|
@ -333,6 +333,13 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
|
|||
filtered.sortBy { it is Medium && !it.name.startsWith(text, true) }
|
||||
val grouped = MediaFetcher(applicationContext).groupMedia(filtered as ArrayList<Medium>, mPath)
|
||||
runOnUiThread {
|
||||
if (grouped.isEmpty()) {
|
||||
media_empty_text_label.text = getString(R.string.no_items_found)
|
||||
media_empty_text_label.beVisible()
|
||||
} else {
|
||||
media_empty_text_label.beGone()
|
||||
}
|
||||
|
||||
getMediaAdapter()?.updateMedia(grouped)
|
||||
measureRecyclerViewContent(grouped)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue