Fixes #4589 :- The empty screen while no images found in custom picture selector [bug] (#4884)

* bug fix

* bug fix 2
This commit is contained in:
RISHAV GUPTA 2022-03-11 19:42:39 +05:30 committed by GitHub
parent 4ea20fafde
commit ed572aab6f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View file

@ -115,7 +115,9 @@ class FolderFragment : CommonsDaggerSupportFragment() {
val images = result.images
if(images.isNullOrEmpty())
{
empty_text.visibility = View.VISIBLE
empty_text?.let {
it.visibility = View.VISIBLE
}
}
folders = ImageHelper.folderListFromImages(result.images)
folderAdapter.init(folders)

View file

@ -142,7 +142,6 @@ class ImageFragment: CommonsDaggerSupportFragment() {
if(result.status is CallbackStatus.SUCCESS){
val images = result.images
if(images.isNotEmpty()) {
empty_text.visibility = View.GONE
filteredImages = ImageHelper.filterImages(images, bucketId)
imageAdapter.init(filteredImages)
selectorRV?.let {
@ -154,7 +153,9 @@ class ImageFragment: CommonsDaggerSupportFragment() {
}
}
else{
empty_text.visibility = View.VISIBLE
empty_text?.let {
it.visibility = View.VISIBLE
}
selectorRV?.let{
it.visibility = View.GONE
}