fix: don't let the attachment open to preview if in progress or pending download

This commit is contained in:
jubb 2021-06-28 10:42:34 +10:00
parent f59b3a3b61
commit 2c8141c8bb
1 changed files with 3 additions and 0 deletions

View File

@ -71,6 +71,9 @@ class AlbumThumbnailView : FrameLayout {
if (Rect.intersects(rawRect, testRect)) {
// hit intersects with this particular child
val slide = slides.getOrNull(index) ?: return
// only open to downloaded images
if (slide.isInProgress || slide.isPendingDownload) return
ActivityDispatcher.get(context)?.dispatchIntent { context ->
MediaPreviewActivity.getPreviewIntent(context, slide, mms)
}