mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-07 01:23:38 +02:00
Prevent duplicate attachment sequence numbers
This commit is contained in:
@@ -578,7 +578,7 @@ public class FragmentCompose extends FragmentEx {
|
||||
try {
|
||||
db.beginTransaction();
|
||||
|
||||
int seq = db.attachment().getAttachmentCount(id);
|
||||
int seq = db.attachment().getAttachmentSequence(id);
|
||||
|
||||
attachment1.message = id;
|
||||
attachment1.sequence = seq + 1;
|
||||
@@ -868,7 +868,7 @@ public class FragmentCompose extends FragmentEx {
|
||||
Log.i(Helper.TAG, "Attaching to id=" + id);
|
||||
|
||||
attachment.message = draft.id;
|
||||
attachment.sequence = db.attachment().getAttachmentCount(draft.id) + 1;
|
||||
attachment.sequence = db.attachment().getAttachmentSequence(draft.id) + 1;
|
||||
attachment.name = name;
|
||||
|
||||
String extension = Helper.getExtension(attachment.name);
|
||||
|
||||
Reference in New Issue
Block a user