From c29c1f36ba37d0e90a4375961045c989c14f8df5 Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 27 Apr 2019 17:20:13 +0200 Subject: [PATCH] Recatoring --- app/src/main/java/eu/faircode/email/FragmentCompose.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentCompose.java b/app/src/main/java/eu/faircode/email/FragmentCompose.java index b81ed074db..1f2c52b399 100644 --- a/app/src/main/java/eu/faircode/email/FragmentCompose.java +++ b/app/src/main/java/eu/faircode/email/FragmentCompose.java @@ -796,7 +796,7 @@ public class FragmentCompose extends FragmentBase { menu.findItem(R.id.menu_attachment).setEnabled(!busy); menu.findItem(R.id.menu_clear).setEnabled(!busy); menu.findItem(R.id.menu_contact_group).setEnabled(!busy); - menu.findItem(R.id.menu_answer).setEnabled(!busy && Helper.isPro(getContext())); + menu.findItem(R.id.menu_answer).setEnabled(!busy); menu.findItem(R.id.menu_encrypt).setEnabled(!busy); menu.findItem(R.id.menu_send_after).setEnabled(!busy); @@ -1130,6 +1130,12 @@ public class FragmentCompose extends FragmentBase { } private void onMenuAnswer() { + if (!Helper.isPro(getContext())) { + FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction(); + fragmentTransaction.replace(R.id.content_frame, new FragmentPro()).addToBackStack("pro"); + fragmentTransaction.commit(); + return; + } new SimpleTask() { @Override protected Cursor onExecute(Context context, Bundle args) {