mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-27 02:07:12 +00:00
Prevent crash
This commit is contained in:
parent
4ac5d36cc8
commit
1ac71c9081
1 changed files with 11 additions and 10 deletions
|
@ -1585,17 +1585,18 @@ public class FragmentMessages extends FragmentEx {
|
|||
try {
|
||||
db.beginTransaction();
|
||||
|
||||
for (EntityMessage message : db.message().getMessageSeen(outbox)) {
|
||||
EntityIdentity identity = db.identity().getIdentity(message.identity);
|
||||
EntityFolder sent = db.folder().getFolderByType(identity.account, EntityFolder.SENT);
|
||||
if (sent != null) {
|
||||
message.folder = sent.id;
|
||||
message.uid = null;
|
||||
db.message().updateMessage(message);
|
||||
Log.i("Appending sent msgid=" + message.msgid);
|
||||
EntityOperation.queue(db, message, EntityOperation.ADD); // Could already exist
|
||||
for (EntityMessage message : db.message().getMessageSeen(outbox))
|
||||
if (message.identity != null) {
|
||||
EntityIdentity identity = db.identity().getIdentity(message.identity);
|
||||
EntityFolder sent = db.folder().getFolderByType(identity.account, EntityFolder.SENT);
|
||||
if (sent != null) {
|
||||
message.folder = sent.id;
|
||||
message.uid = null;
|
||||
db.message().updateMessage(message);
|
||||
Log.i("Appending sent msgid=" + message.msgid);
|
||||
EntityOperation.queue(db, message, EntityOperation.ADD); // Could already exist
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
db.setTransactionSuccessful();
|
||||
} finally {
|
||||
|
|
Loading…
Reference in a new issue