From c1ceb821e60608364a085dfa0ac5d576d3c81c4d Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 2 Jul 2024 09:26:05 +0200 Subject: [PATCH] POP3 can move when leave on server only --- .../main/java/eu/faircode/email/FragmentMessages.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentMessages.java b/app/src/main/java/eu/faircode/email/FragmentMessages.java index c55bb787a2..9c470a1cbb 100644 --- a/app/src/main/java/eu/faircode/email/FragmentMessages.java +++ b/app/src/main/java/eu/faircode/email/FragmentMessages.java @@ -11139,6 +11139,7 @@ public class FragmentMessages extends FragmentBase Boolean isDrafts; boolean hasImap; boolean hasPop; + Boolean leave_on_server; Boolean leave_deleted; boolean read_only; List folders; @@ -11182,7 +11183,7 @@ public class FragmentMessages extends FragmentBase boolean canMove() { if (read_only) return false; - return (imapAccounts.size() > 0); + return (!hasPop || Boolean.TRUE.equals(leave_on_server)) && (imapAccounts.size() > 0); } static MoreResult get(Context context, long[] ids, boolean threading, boolean all) { @@ -11305,6 +11306,12 @@ public class FragmentMessages extends FragmentBase hasJunk = (junk != null && junk.selectable); } else { result.hasPop = true; + + if (result.leave_on_server == null) + result.leave_on_server = account.leave_on_server; + else + result.leave_on_server = (result.leave_on_server && account.leave_on_server); + if (result.leave_deleted == null) result.leave_deleted = account.leave_deleted; else