From b4f7899686760d710aef85db0281684c0f5a2703 Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 18 Jun 2020 19:11:04 +0200 Subject: [PATCH] Added leave delete hint --- FAQ.md | 13 +++++++++++-- .../java/eu/faircode/email/FragmentAccount.java | 10 ++++++++++ app/src/main/res/layout/fragment_account.xml | 15 +++++++++++++-- 3 files changed, 34 insertions(+), 4 deletions(-) diff --git a/FAQ.md b/FAQ.md index f33d7a09fc..c499be49a5 100644 --- a/FAQ.md +++ b/FAQ.md @@ -2738,12 +2738,21 @@ that non-standard protocols, like Microsoft Exchange Web Services and Microsoft **(134) Can you add deleting local messages?** -Since locally deleted messages would be downloaded again on the next sync it is not possible to permanently delete local messages. +*POP3* -As an alternative you can hide messages, +In the account settings (Setup, step 1, Manage, tap account) you can enable *Leave deleted messages on server*. + +*IMAP* + +Since the IMAP protocol is meant to synchronize two ways, +deleting a message from the device would result in fetching the message again when synchronizing again. + +However, FairEmail supports hiding messages, either via the three-dots menu in the action bar just above the message text or by multiple selecting messages in the message list. +It is also possible to set the swipe left or right action to hide a message. +
diff --git a/app/src/main/java/eu/faircode/email/FragmentAccount.java b/app/src/main/java/eu/faircode/email/FragmentAccount.java index 337aecc2b4..ff3b770ca2 100644 --- a/app/src/main/java/eu/faircode/email/FragmentAccount.java +++ b/app/src/main/java/eu/faircode/email/FragmentAccount.java @@ -108,6 +108,7 @@ public class FragmentAccount extends FragmentBase { private Button btnAdvanced; private CheckBox cbSynchronize; private CheckBox cbOnDemand; + private TextView tvLeave; private CheckBox cbPrimary; private CheckBox cbNotify; private TextView tvNotifyPro; @@ -221,6 +222,7 @@ public class FragmentAccount extends FragmentBase { btnAdvanced = view.findViewById(R.id.btnAdvanced); cbSynchronize = view.findViewById(R.id.cbSynchronize); cbOnDemand = view.findViewById(R.id.cbOnDemand); + tvLeave = view.findViewById(R.id.tvLeave); cbPrimary = view.findViewById(R.id.cbPrimary); cbNotify = view.findViewById(R.id.cbNotify); tvNotifyPro = view.findViewById(R.id.tvNotifyPro); @@ -430,6 +432,14 @@ public class FragmentAccount extends FragmentBase { } }); + tvLeave.getPaint().setUnderlineText(true); + tvLeave.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + Helper.viewFAQ(getContext(), 134); + } + }); + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) { Helper.hide(cbNotify); Helper.hide(view.findViewById(R.id.tvNotifyPro)); diff --git a/app/src/main/res/layout/fragment_account.xml b/app/src/main/res/layout/fragment_account.xml index 0bd1e98bd7..452a115bd3 100644 --- a/app/src/main/res/layout/fragment_account.xml +++ b/app/src/main/res/layout/fragment_account.xml @@ -434,6 +434,17 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/cbSynchronize" /> + + + app:layout_constraintTop_toBottomOf="@id/tvLeave" />