From 2ae118d6cbb7fec37ce0f8e5b10101a0735564e5 Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 4 Sep 2026 21:11:29 +0200 Subject: [PATCH] Revert "Added expunge/trash debug option" This reverts commit a0dc903efeb489700fbc1f897a64efc0bc671153. --- app/src/main/java/eu/faircode/email/Core.java | 5 +---- .../eu/faircode/email/FragmentOptionsMisc.java | 12 +----------- .../main/res/layout/fragment_options_misc.xml | 16 +--------------- app/src/main/res/values/strings.xml | 1 - 4 files changed, 3 insertions(+), 31 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/Core.java b/app/src/main/java/eu/faircode/email/Core.java index 5a207892c6..98187dc9dc 100644 --- a/app/src/main/java/eu/faircode/email/Core.java +++ b/app/src/main/java/eu/faircode/email/Core.java @@ -1454,9 +1454,6 @@ class Core { // Move message DB db = DB.getInstance(context); - SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(context); - boolean expunge_trash = pref.getBoolean("expunge_trash", false); - // Get arguments long id = jargs.getLong(0); boolean seen = jargs.optBoolean(1); @@ -1621,7 +1618,7 @@ class Core { ex.getCause().getMessage().contains("[EXPUNGEISSUED]"))) throw ex; } - else if (!expunge_trash || !EntityFolder.TRASH.equals(target.type)) + else ifolder.copyMessages(map.keySet().toArray(new Message[0]), itarget); } diff --git a/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java b/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java index 3e0f10a4f2..1119c50f6f 100644 --- a/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java +++ b/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java @@ -207,7 +207,6 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc private SwitchCompat swUid; private SwitchCompat swExpunge; private SwitchCompat swUidExpunge; - private SwitchCompat swExpungeTrash; private SwitchCompat swImapCompress; private SwitchCompat swAuthPlain; private SwitchCompat swAuthLogin; @@ -310,7 +309,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc "viewport_height", "ignore_formatted_size", "show_recent", - "use_modseq", "preamble", "uid_command", "perform_expunge", "uid_expunge", "expunge_trash", + "use_modseq", "preamble", "uid_command", "perform_expunge", "uid_expunge", "imap_compress", "auth_plain", "auth_login", "auth_ntlm", "auth_sasl", "auth_apop", "use_top", "forget_top", "keep_alive_poll", "empty_pool", "idle_done", "fast_fetch", "max_backoff_power", "logarithmic_backoff", @@ -485,7 +484,6 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc swUid = view.findViewById(R.id.swUid); swExpunge = view.findViewById(R.id.swExpunge); swUidExpunge = view.findViewById(R.id.swUidExpunge); - swExpungeTrash = view.findViewById(R.id.swExpungeTrash); swImapCompress = view.findViewById(R.id.swImapCompress); swAuthPlain = view.findViewById(R.id.swAuthPlain); swAuthLogin = view.findViewById(R.id.swAuthLogin); @@ -1542,13 +1540,6 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc } }); - swExpungeTrash.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { - @Override - public void onCheckedChanged(CompoundButton compoundButton, boolean checked) { - prefs.edit().putBoolean("expunge_trash", checked).apply(); - } - }); - swImapCompress.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton compoundButton, boolean checked) { @@ -2651,7 +2642,6 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc swUid.setChecked(prefs.getBoolean("uid_command", false)); swExpunge.setChecked(prefs.getBoolean("perform_expunge", true)); swUidExpunge.setChecked(prefs.getBoolean("uid_expunge", false)); - swExpungeTrash.setChecked(prefs.getBoolean("expunge_trash", false)); swImapCompress.setChecked(prefs.getBoolean("imap_compress", true)); swAuthPlain.setChecked(prefs.getBoolean("auth_plain", true)); swAuthLogin.setChecked(prefs.getBoolean("auth_login", true)); diff --git a/app/src/main/res/layout/fragment_options_misc.xml b/app/src/main/res/layout/fragment_options_misc.xml index 3c3e02663e..2e8004fb05 100644 --- a/app/src/main/res/layout/fragment_options_misc.xml +++ b/app/src/main/res/layout/fragment_options_misc.xml @@ -1480,20 +1480,6 @@ app:layout_constraintTop_toBottomOf="@id/swExpunge" app:switchPadding="12dp" /> - - UID command AUTO EXPUNGE UID EXPUNGE - Expunge > trash Hide deleted messages COMPRESS PLAIN