mirror of https://github.com/M66B/FairEmail.git
Added option to disable clearing selection / quick actions
This commit is contained in:
parent
389d032185
commit
78aa98a171
|
@ -1441,14 +1441,16 @@ public class FragmentMessages extends FragmentBase
|
|||
ibBatchSeen.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
onActionSeenSelection(true, null, true);
|
||||
boolean more_clear = prefs.getBoolean("more_clear", true);
|
||||
onActionSeenSelection(true, null, more_clear);
|
||||
}
|
||||
});
|
||||
|
||||
ibBatchUnseen.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
onActionSeenSelection(false, null, true);
|
||||
boolean more_clear = prefs.getBoolean("more_clear", true);
|
||||
onActionSeenSelection(false, null, more_clear);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -1469,21 +1471,24 @@ public class FragmentMessages extends FragmentBase
|
|||
ibBatchFlag.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
onActionFlagSelection(true, Color.TRANSPARENT, null, true);
|
||||
boolean more_clear = prefs.getBoolean("more_clear", true);
|
||||
onActionFlagSelection(true, Color.TRANSPARENT, null, more_clear);
|
||||
}
|
||||
});
|
||||
|
||||
ibLowImportance.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
onActionSetImportanceSelection(EntityMessage.PRIORITIY_LOW, true);
|
||||
boolean more_clear = prefs.getBoolean("more_clear", true);
|
||||
onActionSetImportanceSelection(EntityMessage.PRIORITIY_LOW, more_clear);
|
||||
}
|
||||
});
|
||||
|
||||
ibHighImportance.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
onActionSetImportanceSelection(EntityMessage.PRIORITIY_HIGH, true);
|
||||
boolean more_clear = prefs.getBoolean("more_clear", true);
|
||||
onActionSetImportanceSelection(EntityMessage.PRIORITIY_HIGH, more_clear);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -10866,6 +10871,7 @@ public class FragmentMessages extends FragmentBase
|
|||
final CheckBox cbTrash = dview.findViewById(R.id.cbTrash);
|
||||
final CheckBox cbDelete = dview.findViewById(R.id.cbDelete);
|
||||
final CheckBox cbMove = dview.findViewById(R.id.cbMove);
|
||||
final CheckBox cbClear = dview.findViewById(R.id.cbClear);
|
||||
|
||||
tvHint.setText(getString(R.string.title_quick_actions_hint, MAX_QUICK_ACTIONS));
|
||||
cbSeen.setChecked(prefs.getBoolean("more_seen", true));
|
||||
|
@ -10881,6 +10887,7 @@ public class FragmentMessages extends FragmentBase
|
|||
cbTrash.setChecked(prefs.getBoolean("more_trash", true));
|
||||
cbDelete.setChecked(prefs.getBoolean("more_delete", false));
|
||||
cbMove.setChecked(prefs.getBoolean("more_move", true));
|
||||
cbClear.setChecked(prefs.getBoolean("more_clear", true));
|
||||
|
||||
return new AlertDialog.Builder(getContext())
|
||||
.setView(dview)
|
||||
|
@ -10901,6 +10908,7 @@ public class FragmentMessages extends FragmentBase
|
|||
editor.putBoolean("more_trash", cbTrash.isChecked());
|
||||
editor.putBoolean("more_delete", cbDelete.isChecked());
|
||||
editor.putBoolean("more_move", cbMove.isChecked());
|
||||
editor.putBoolean("more_clear", cbClear.isChecked());
|
||||
editor.apply();
|
||||
sendResult(Activity.RESULT_OK);
|
||||
}
|
||||
|
|
|
@ -199,5 +199,28 @@
|
|||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/cbDelete" />
|
||||
|
||||
<View
|
||||
android:id="@+id/vSeparator"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:background="?attr/colorSeparator"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/cbMove" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cbClear"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:drawableEnd="@drawable/twotone_checklist_24"
|
||||
android:drawablePadding="6dp"
|
||||
android:text="@string/title_quick_actions_clear"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/vSeparator" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</eu.faircode.email.ScrollViewEx>
|
||||
|
|
|
@ -1286,6 +1286,7 @@
|
|||
<string name="title_quick_actions_low">Low importance</string>
|
||||
<string name="title_quick_actions_high">High importance</string>
|
||||
<string name="title_quick_actions_snooze">Snooze</string>
|
||||
<string name="title_quick_actions_clear">Clear selection after action</string>
|
||||
|
||||
<string name="title_trash">Trash</string>
|
||||
<string name="title_copy">Copy …</string>
|
||||
|
|
Loading…
Reference in New Issue