diff --git a/app/src/main/java/eu/faircode/email/FragmentFolders.java b/app/src/main/java/eu/faircode/email/FragmentFolders.java index f0215bca8d..ab5266ea28 100644 --- a/app/src/main/java/eu/faircode/email/FragmentFolders.java +++ b/app/src/main/java/eu/faircode/email/FragmentFolders.java @@ -643,7 +643,7 @@ public class FragmentFolders extends FragmentBase { db.folder().setFolderKeep(folder.id, Integer.MAX_VALUE); } else if (months > 0) { db.folder().setFolderInitialize(folder.id, months * 30); - db.folder().setFolderKeep(folder.id, months * 30); + db.folder().setFolderKeep(folder.id, Math.max(folder.keep_days, months * 30)); } EntityOperation.sync(context, folder.id, true);