Add logging around attachment id update.

This commit is contained in:
Alex Hart 2022-09-30 15:18:52 -03:00 committed by Greyson Parrelli
parent c1f3e27101
commit 083219888c

View file

@ -757,10 +757,15 @@ public class AttachmentDatabase extends Database {
values.putNull(CAPTION);
}
int updatedCount = 0;
int attachmentIdSize = 0;
for (AttachmentId attachmentId : attachmentIds) {
db.update(TABLE_NAME, values, PART_ID_WHERE, attachmentId.toStrings());
attachmentIdSize++;
updatedCount = db.update(TABLE_NAME, values, PART_ID_WHERE, attachmentId.toStrings());
}
Log.d(TAG, "[updateMessageId] Updated " + updatedCount + " out of " + attachmentIdSize + " ids.");
db.setTransactionSuccessful();
} finally {
db.endTransaction();