diff --git a/FAQ.md b/FAQ.md index 6b28b4893f..ed5229c608 100644 --- a/FAQ.md +++ b/FAQ.md @@ -3532,6 +3532,10 @@ please see [here](https://github.com/disconnectme/disconnect-tracking-protection Permanent deletion means that messages will *irreversibly* be lost, and to prevent this from happening accidentally, this always needs to be confirmed. Even with a confirmation, some very angry people who lost some of their messages through their own fault contacted me, which was a rather unpleasant experience :-( +Note that the POP3 protocol can download messages from the inbox only. +So, deleted messages cannot be uploaded to the inbox again. +This means that messages can only be permanently deleted when using a POP3 account. + Advanced: the IMAP delete flag in combination with the EXPUNGE command is not supportable because both email servers and not all people can handle this, risking unexpected loss of messages. A complicating factor is that not all email servers support [UID EXPUNGE](https://tools.ietf.org/html/rfc4315). diff --git a/app/src/main/java/eu/faircode/email/FragmentDialogAsk.java b/app/src/main/java/eu/faircode/email/FragmentDialogAsk.java index 3d4b35868a..ded54e0ea3 100644 --- a/app/src/main/java/eu/faircode/email/FragmentDialogAsk.java +++ b/app/src/main/java/eu/faircode/email/FragmentDialogAsk.java @@ -30,6 +30,7 @@ import android.view.LayoutInflater; import android.view.View; import android.widget.CheckBox; import android.widget.CompoundButton; +import android.widget.ImageButton; import android.widget.TextView; import androidx.annotation.NonNull; @@ -47,6 +48,7 @@ public class FragmentDialogAsk extends FragmentDialogBase { String confirm = args.getString("confirm"); String notagain = args.getString("notagain"); boolean warning = args.getBoolean("warning"); + int faq = args.getInt("faq"); final Context context = getContext(); final int colorError = Helper.resolveColor(context, R.attr.colorError); @@ -56,6 +58,7 @@ public class FragmentDialogAsk extends FragmentDialogBase { TextView tvRemark = dview.findViewById(R.id.tvRemark); CheckBox cbConfirm = dview.findViewById(R.id.cbConfirm); CheckBox cbNotAgain = dview.findViewById(R.id.cbNotAgain); + ImageButton ibInfo = dview.findViewById(R.id.ibInfo); tvMessage.setText(question); tvRemark.setText(remark); @@ -63,6 +66,7 @@ public class FragmentDialogAsk extends FragmentDialogBase { cbConfirm.setText(confirm); cbConfirm.setVisibility(confirm == null ? View.GONE : View.VISIBLE); cbNotAgain.setVisibility(notagain == null ? View.GONE : View.VISIBLE); + ibInfo.setVisibility(faq == 0 ? View.GONE : View.VISIBLE); if (warning) { Drawable w = context.getDrawable(R.drawable.twotone_warning_24); @@ -81,6 +85,14 @@ public class FragmentDialogAsk extends FragmentDialogBase { } }); + if (faq != 0) + ibInfo.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Helper.viewFAQ(v.getContext(), faq); + } + }); + return new AlertDialog.Builder(getContext()) .setView(dview) .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() { diff --git a/app/src/main/java/eu/faircode/email/FragmentMessages.java b/app/src/main/java/eu/faircode/email/FragmentMessages.java index 33faef493b..8f69d0de99 100644 --- a/app/src/main/java/eu/faircode/email/FragmentMessages.java +++ b/app/src/main/java/eu/faircode/email/FragmentMessages.java @@ -3353,6 +3353,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences. .getQuantityString(R.plurals.title_deleting_messages, ids.size(), ids.size())); if (!pop && !EntityFolder.TRASH.equals(type) && !EntityFolder.JUNK.equals(type)) aargs.putString("confirm", getString(R.string.title_no_undo)); + aargs.putInt("faq", 160); aargs.putLongArray("ids", Helper.toLongArray(ids)); aargs.putBoolean("warning", true); @@ -3734,6 +3735,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences. aargs.putString("question", getResources() .getQuantityString(R.plurals.title_deleting_messages, ids.size(), ids.size())); aargs.putString("remark", getString(R.string.title_no_undo)); + aargs.putInt("faq", 160); aargs.putLongArray("ids", Helper.toLongArray(ids)); aargs.putBoolean("warning", true); diff --git a/app/src/main/res/layout/dialog_ask_again.xml b/app/src/main/res/layout/dialog_ask_again.xml index 3e015871c4..00194044d8 100644 --- a/app/src/main/res/layout/dialog_ask_again.xml +++ b/app/src/main/res/layout/dialog_ask_again.xml @@ -51,5 +51,18 @@ android:textAppearance="@style/TextAppearance.AppCompat.Small" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/cbConfirm" /> + + \ No newline at end of file