mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-21 10:17:56 +00:00
Only mark exported attachment as wasDownloaded if plaintextHash present.
This commit is contained in:
committed by
Michelle Tang
parent
4c00337b1a
commit
75346c3f6b
@@ -1254,9 +1254,10 @@ private fun List<DatabaseAttachment>.toRemoteQuoteAttachments(): List<Quote.Quot
|
||||
}
|
||||
|
||||
private fun DatabaseAttachment.toRemoteMessageAttachment(flagOverride: MessageAttachment.Flag? = null, contentTypeOverride: String? = null): MessageAttachment {
|
||||
val pointer = this.toRemoteFilePointer(contentTypeOverride)
|
||||
return MessageAttachment(
|
||||
pointer = this.toRemoteFilePointer(contentTypeOverride),
|
||||
wasDownloaded = this.transferState == AttachmentTable.TRANSFER_PROGRESS_DONE || this.transferState == AttachmentTable.TRANSFER_NEEDS_RESTORE,
|
||||
pointer = pointer,
|
||||
wasDownloaded = (this.transferState == AttachmentTable.TRANSFER_PROGRESS_DONE || this.transferState == AttachmentTable.TRANSFER_NEEDS_RESTORE) && pointer.locatorInfo?.plaintextHash != null,
|
||||
flag = if (flagOverride != null) {
|
||||
flagOverride
|
||||
} else if (this.voiceNote) {
|
||||
|
||||
Reference in New Issue
Block a user