Skip to content

Commit

Permalink
Fix link preview loading indicator when images are disabled. (#2674)
Browse files Browse the repository at this point in the history
Co-authored-by: Cooltey Feng <cfeng@wikimedia.org>
  • Loading branch information
dbrant and cooltey committed Jul 30, 2021
1 parent fbef8db commit ab18c85
Showing 1 changed file with 5 additions and 5 deletions.
Expand Up @@ -206,14 +206,14 @@ class LinkPreviewDialog : ExtendedBottomSheetDialogFragment(), LinkPreviewErrorV
.observeOn(AndroidSchedulers.mainThread())
.doAfterTerminate { binding.linkPreviewProgress.visibility = View.GONE }
.subscribe({ response ->
response?.let {
val pageList = response.query?.pages()?.filter { it.imageInfo() != null }.orEmpty()
binding.linkPreviewThumbnailGallery.setGalleryList(pageList)
binding.linkPreviewThumbnailGallery.listener = galleryViewListener
}
val pageList = response.query?.pages()?.filter { it.imageInfo() != null }.orEmpty()
binding.linkPreviewThumbnailGallery.setGalleryList(pageList)
binding.linkPreviewThumbnailGallery.listener = galleryViewListener
}) { caught ->
L.w("Failed to fetch gallery collection.", caught)
})
} else {
binding.linkPreviewProgress.visibility = View.GONE
}
}

Expand Down

0 comments on commit ab18c85

Please sign in to comment.