Skip to content

Commit 947d025

Browse files
fix attachments not being loaded in dev enviornment
Refer to this discussion: https://discord.com/channels/1138230179878154300/1387703779662631004
1 parent 5c511bd commit 947d025

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Sources/PowerSync/attachments/AttachmentQueue.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -417,15 +417,15 @@ open class AttachmentQueue {
417417
}
418418

419419
let exists = try await localStorage.fileExists(filePath: localUri)
420-
if attachment.state == AttachmentState.synced ||
421-
attachment.state == AttachmentState.queuedUpload &&
422-
!exists
420+
if attachment.state == AttachmentState.synced
421+
|| attachment.state == AttachmentState.queuedUpload && !exists
423422
{
424423
// The file must have been removed from the local storage
425-
updates.append(attachment.with(
426-
state: .archived,
427-
localUri: .some(nil) // Clears the value
428-
))
424+
updates.append(
425+
attachment.with(
426+
state: .archived,
427+
localUri: .some(nil) // Clears the value
428+
))
429429
}
430430
}
431431

0 commit comments

Comments
 (0)