Set notes for duplicates

This commit is contained in:
M66B 2021-03-01 18:11:54 +01:00
parent 9749ccd1e3
commit 25d8507c20
1 changed files with 23 additions and 1 deletions

View File

@ -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;
}