Permanent delete FAQ

This commit is contained in:
M66B 2021-05-15 10:21:08 +02:00
parent 692c742020
commit 65dca8d7db
4 changed files with 31 additions and 0 deletions

4
FAQ.md
View File

@ -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).

View File

@ -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() {

View File

@ -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);

View File

@ -51,5 +51,18 @@
android:textAppearance="@style/TextAppearance.AppCompat.Small"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbConfirm" />
<ImageButton
android:id="@+id/ibInfo"
android:layout_width="36dp"
android:layout_height="36dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/title_info"
android:padding="6dp"
android:scaleType="fitCenter"
android:tooltipText="@string/title_info"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbNotAgain"
app:srcCompat="@drawable/twotone_info_24" />
</androidx.constraintlayout.widget.ConstraintLayout>
</eu.faircode.email.ScrollViewEx>