Browse Source

Move all messages in thread of selected message

main
M66B 6 years ago
parent
commit
ccbeed18bf
1 changed files with 8 additions and 3 deletions
  1. +8
    -3
      app/src/main/java/eu/faircode/email/FragmentMessages.java

+ 8
- 3
app/src/main/java/eu/faircode/email/FragmentMessages.java View File

@ -624,10 +624,15 @@ public class FragmentMessages extends FragmentEx {
db.beginTransaction(); db.beginTransaction();
for (long id : ids) { for (long id : ids) {
db.message().setMessageUiHide(id, true);
EntityMessage message = db.message().getMessage(id); EntityMessage message = db.message().getMessage(id);
EntityOperation.queue(db, message, EntityOperation.MOVE, target);
List<EntityMessage> messages =
db.message().getMessageByThread(message.account, message.thread);
for (EntityMessage threaded : messages) {
if (threaded.folder.equals(message.folder)) {
db.message().setMessageUiHide(threaded.id, true);
EntityOperation.queue(db, threaded, EntityOperation.MOVE, target);
}
}
} }
db.setTransactionSuccessful(); db.setTransactionSuccessful();


Loading…
Cancel
Save