mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 04:35:57 +00:00
Refactoring
This commit is contained in:
parent
81dbe10c95
commit
25a17f11a6
4 changed files with 9 additions and 9 deletions
|
@ -2898,7 +2898,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
case R.id.menu_reply_receipt:
|
||||
onMenuReply(data, "receipt");
|
||||
return true;
|
||||
case R.id.menu_reply_template:
|
||||
case R.id.menu_reply_answer:
|
||||
onMenuAnswer(data);
|
||||
return true;
|
||||
default:
|
||||
|
|
|
@ -755,7 +755,7 @@ public class FragmentCompose extends FragmentBase {
|
|||
menu.findItem(R.id.menu_attachment).setVisible(state == State.LOADED && !style);
|
||||
menu.findItem(R.id.menu_clear).setVisible(state == State.LOADED);
|
||||
menu.findItem(R.id.menu_contact_group).setVisible(state == State.LOADED);
|
||||
menu.findItem(R.id.menu_template).setVisible(state == State.LOADED);
|
||||
menu.findItem(R.id.menu_answer).setVisible(state == State.LOADED);
|
||||
menu.findItem(R.id.menu_encrypt).setVisible(state == State.LOADED);
|
||||
menu.findItem(R.id.menu_send_after).setVisible(state == State.LOADED);
|
||||
|
||||
|
@ -764,7 +764,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_template).setEnabled(!busy && Helper.isPro(getContext()));
|
||||
menu.findItem(R.id.menu_answer).setEnabled(!busy && Helper.isPro(getContext()));
|
||||
menu.findItem(R.id.menu_encrypt).setEnabled(!busy);
|
||||
menu.findItem(R.id.menu_send_after).setEnabled(!busy);
|
||||
|
||||
|
@ -803,8 +803,8 @@ public class FragmentCompose extends FragmentBase {
|
|||
case R.id.menu_contact_group:
|
||||
onMenuContactGroup();
|
||||
return true;
|
||||
case R.id.menu_template:
|
||||
onMenuTemplate();
|
||||
case R.id.menu_answer:
|
||||
onMenuAnswer();
|
||||
return true;
|
||||
case R.id.menu_encrypt:
|
||||
onMenuEncrypt();
|
||||
|
@ -1097,7 +1097,7 @@ public class FragmentCompose extends FragmentBase {
|
|||
dialog.show();
|
||||
}
|
||||
|
||||
private void onMenuTemplate() {
|
||||
private void onMenuAnswer() {
|
||||
new SimpleTask<Cursor>() {
|
||||
@Override
|
||||
protected Cursor onExecute(Context context, Bundle args) {
|
||||
|
@ -1143,7 +1143,7 @@ public class FragmentCompose extends FragmentBase {
|
|||
protected void onException(Bundle args, Throwable ex) {
|
||||
Helper.unexpectedError(getContext(), getViewLifecycleOwner(), ex);
|
||||
}
|
||||
}.execute(this, new Bundle(), "compose:template");
|
||||
}.execute(this, new Bundle(), "compose:answer");
|
||||
}
|
||||
|
||||
private void onMenuEncrypt() {
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
app:showAsAction="never" />
|
||||
|
||||
<item
|
||||
android:id="@+id/menu_template"
|
||||
android:id="@+id/menu_answer"
|
||||
android:title="@string/title_insert_template"
|
||||
app:showAsAction="never" />
|
||||
|
||||
|
|
|
@ -17,6 +17,6 @@
|
|||
android:title="@string/title_reply_receipt" />
|
||||
|
||||
<item
|
||||
android:id="@+id/menu_reply_template"
|
||||
android:id="@+id/menu_reply_answer"
|
||||
android:title="@string/title_reply_template" />
|
||||
</menu>
|
Loading…
Reference in a new issue