1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-31 11:31:40 +00:00

Simplification

This commit is contained in:
M66B 2021-04-24 19:20:02 +02:00
parent 802270160b
commit 3bff0b11a8

View file

@ -4216,7 +4216,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
onActionMove(message, true);
return true;
} else if (itemId == R.id.menu_delete) {
onMenuDelete(message);
onActionDelete(message);
return true;
} else if (itemId == R.id.menu_resync) {
onMenuResync(message);
@ -4587,19 +4587,6 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
}.execute(context, owner, args, "importance:set");
}
private void onMenuDelete(final TupleMessageEx message) {
Bundle aargs = new Bundle();
aargs.putString("question", context.getString(R.string.title_ask_delete));
aargs.putString("remark", message.getRemark());
aargs.putLong("id", message.id);
aargs.putBoolean("warning", true);
FragmentDialogAsk ask = new FragmentDialogAsk();
ask.setArguments(aargs);
ask.setTargetFragment(parentFragment, FragmentMessages.REQUEST_MESSAGE_DELETE);
ask.show(parentFragment.getParentFragmentManager(), "message:delete");
}
private void onMenuResync(TupleMessageEx message) {
Bundle args = new Bundle();
args.putLong("id", message.id);