Don't set attachment progress to 1 if it's complete.

This commit is contained in:
Nicholas Tinsley 2023-12-21 08:34:42 -05:00 committed by Clark Chen
parent c2ee621f64
commit 9c7f2250b9

View file

@ -549,7 +549,7 @@ class TransferControlView @JvmOverloads constructor(context: Context, attrs: Att
for (slide in slides) { for (slide in slides) {
val attachment = slide.asAttachment() val attachment = slide.asAttachment()
if (attachment.transferState == AttachmentTable.TRANSFER_PROGRESS_DONE) { if (attachment.transferState == AttachmentTable.TRANSFER_PROGRESS_DONE) {
networkProgress[attachment] = Progress(1L, attachment.size) networkProgress[attachment] = Progress(attachment.size, attachment.size)
} else if (!MediaUtil.isInstantVideoSupported(slide)) { } else if (!MediaUtil.isInstantVideoSupported(slide)) {
allStreamableOrDone = false allStreamableOrDone = false
} }