Prevent trashing conversation when trashing draft

pull/212/head
M66B 2 years ago
parent bf10ec1fc6
commit 21ad47d30c

@ -3310,6 +3310,9 @@ public class FragmentMessages extends FragmentBase
EntityAccount sourceAccount = db.account().getAccount(message.account);
if (sourceAccount == null)
return result;
EntityFolder baseFolder = db.folder().getFolder(message.folder);
if (baseFolder == null)
return result;
EntityFolder targetFolder = db.folder().getFolder(tid);
if (targetFolder == null)
@ -3322,6 +3325,7 @@ public class FragmentMessages extends FragmentBase
List<EntityMessage> messages = db.message().getMessagesByThread(
message.account, message.thread,
threading && thread ? null : id,
!EntityFolder.DRAFTS.equals(baseFolder.type) &&
EntityFolder.TRASH.equals(targetFolder.type) ? null : message.folder);
for (EntityMessage threaded : messages) {
EntityFolder sourceFolder = db.folder().getFolder(threaded.folder);

Loading…
Cancel
Save