Skip to content

Commit f8e3d61

Browse files
skip archiving attachments pendingUpload
1 parent ad7423c commit f8e3d61

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Sources/PowerSync/attachments/AttachmentQueue.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,9 @@ public class AttachmentQueue {
278278
* Archive any items not specified in the watched items except for items pending delete.
279279
*/
280280
for attachment in currentAttachments {
281-
if attachment.state != AttachmentState.queuedDelete,
282-
items.first(where: { $0.id == attachment.id }) == nil
281+
if attachment.state != AttachmentState.queuedDelete &&
282+
attachment.state != AttachmentState.queuedUpload,
283+
items.first(where: { $0.id == attachment.id }) == nil
283284
{
284285
attachmentUpdates.append(
285286
attachment.with(state: AttachmentState.archived)

0 commit comments

Comments
 (0)