Added delete all remark

pull/184/head
M66B 4 years ago
parent 213cc76408
commit 1378316aaf

@ -714,6 +714,7 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
aargs.putString("question", context.getString(R.string.title_empty_spam_ask));
else
throw new IllegalArgumentException("Invalid folder type=" + type);
aargs.putString("remark", context.getString(R.string.title_empty_all));
aargs.putLong("folder", folder.id);
aargs.putString("type", type);

@ -40,13 +40,17 @@ public class FragmentDialogAsk extends FragmentDialogBase {
@Override
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
String question = getArguments().getString("question");
String remark = getArguments().getString("remark");
String notagain = getArguments().getString("notagain");
View dview = LayoutInflater.from(getContext()).inflate(R.layout.dialog_ask_again, null);
TextView tvMessage = dview.findViewById(R.id.tvMessage);
TextView tvRemark = dview.findViewById(R.id.tvRemark);
CheckBox cbNotAgain = dview.findViewById(R.id.cbNotAgain);
tvMessage.setText(question);
tvRemark.setText(remark);
tvRemark.setVisibility(remark == null ? View.GONE : View.VISIBLE);
cbNotAgain.setVisibility(notagain == null ? View.GONE : View.VISIBLE);
if (notagain != null)

@ -3768,6 +3768,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
account < 0 ? R.string.title_empty_spam_all_ask : R.string.title_empty_spam_ask));
else
throw new IllegalArgumentException("Invalid folder type=" + type);
aargs.putString("remark", getString(R.string.title_empty_all));
aargs.putLong("account", account);
aargs.putString("type", type);

@ -20,6 +20,17 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<eu.faircode.email.FixedTextView
android:id="@+id/tvRemark"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:text="Remark"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textStyle="italic"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvMessage" />
<CheckBox
android:id="@+id/cbNotAgain"
android:layout_width="wrap_content"
@ -28,6 +39,6 @@
android:text="@string/title_no_ask_again"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvMessage" />
app:layout_constraintTop_toBottomOf="@id/tvRemark" />
</androidx.constraintlayout.widget.ConstraintLayout>
</eu.faircode.email.ScrollViewEx>

@ -698,6 +698,7 @@
<string name="title_empty_spam_ask">Delete all spam messages permanently?</string>
<string name="title_empty_trash_all_ask">Delete all trashed messages of all accounts permanently?</string>
<string name="title_empty_spam_all_ask">Delete all spam messages of all accounts permanently?</string>
<string name="title_empty_all">This will delete all messages both from the device and the server</string>
<string name="title_delete_operation">Delete operations with an error message?</string>
<string name="title_delete_contacts">Delete all local contacts?</string>
<string name="title_no_operations">No pending operations</string>

Loading…
Cancel
Save