Reply all requires multiple recipients

This commit is contained in:
M66B 2019-05-21 15:28:32 +02:00
parent 8df51f0261
commit b0e83d6fa0
1 changed files with 7 additions and 0 deletions

View File

@ -3192,9 +3192,16 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
}
private void onActionReplyMenu(final ActionData data) {
int recipients = 0;
if (data.message.to != null)
recipients += data.message.to.length;
if (data.message.cc != null)
recipients += data.message.cc.length;
View anchor = bnvActions.findViewById(R.id.action_reply);
PopupMenuLifecycle popupMenu = new PopupMenuLifecycle(context, powner, anchor);
popupMenu.inflate(R.menu.menu_reply);
popupMenu.getMenu().findItem(R.id.menu_reply_to_all).setVisible(recipients > 1);
popupMenu.getMenu().findItem(R.id.menu_reply_list).setVisible(data.message.list_post != null);
popupMenu.getMenu().findItem(R.id.menu_reply_receipt).setVisible(data.message.receipt_to != null);