Skip create remote key copy if duplicate is same attachment.

This commit is contained in:
Cody Henthorne
2026-06-09 11:52:09 -04:00
parent 582a464a52
commit 2b17868797
@@ -2088,6 +2088,10 @@ class AttachmentTable(
if (duplicate != null) {
val (duplicateAttachment, dataFileInfo) = duplicate
if (duplicateAttachment.attachmentId == attachmentId) {
return
}
if (duplicateAttachment.remoteLocation != null && duplicateAttachment.remoteDigest != null && dataFileInfo != null) {
Log.w(TAG, "[createRemoteKeyIfNecessary][$attachmentId] Found duplicate with full remote data. Copying all remote data.")
writableDatabase