mirror of https://github.com/M66B/FairEmail.git
Set notes for duplicates
This commit is contained in:
parent
9749ccd1e3
commit
25d8507c20
|
@ -6717,7 +6717,29 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
notes = null;
|
||||
|
||||
DB db = DB.getInstance(context);
|
||||
db.message().setMessageNotes(id, notes);
|
||||
try {
|
||||
db.beginTransaction();
|
||||
|
||||
EntityMessage message = db.message().getMessage(id);
|
||||
if (message == null)
|
||||
return null;
|
||||
|
||||
db.message().setMessageNotes(message.id, notes);
|
||||
|
||||
if (TextUtils.isEmpty(message.hash))
|
||||
return null;
|
||||
|
||||
List<EntityMessage> messages = db.message().getMessagesByHash(message.account, message.hash);
|
||||
if (messages == null)
|
||||
return null;
|
||||
|
||||
for (EntityMessage m : messages)
|
||||
db.message().setMessageNotes(m.id, notes);
|
||||
|
||||
db.setTransactionSuccessful();
|
||||
} finally {
|
||||
db.endTransaction();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue