mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-25 01:07:47 +00:00
fix: don't let the attachment open to preview if in progress or pending download
This commit is contained in:
parent
f59b3a3b61
commit
2c8141c8bb
@ -71,6 +71,9 @@ class AlbumThumbnailView : FrameLayout {
|
|||||||
if (Rect.intersects(rawRect, testRect)) {
|
if (Rect.intersects(rawRect, testRect)) {
|
||||||
// hit intersects with this particular child
|
// hit intersects with this particular child
|
||||||
val slide = slides.getOrNull(index) ?: return
|
val slide = slides.getOrNull(index) ?: return
|
||||||
|
// only open to downloaded images
|
||||||
|
if (slide.isInProgress || slide.isPendingDownload) return
|
||||||
|
|
||||||
ActivityDispatcher.get(context)?.dispatchIntent { context ->
|
ActivityDispatcher.get(context)?.dispatchIntent { context ->
|
||||||
MediaPreviewActivity.getPreviewIntent(context, slide, mms)
|
MediaPreviewActivity.getPreviewIntent(context, slide, mms)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user