1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-26 17:57:16 +00:00

Added menu divider in answer menu

This commit is contained in:
M66B 2021-08-17 21:13:29 +02:00
parent e8a8be6542
commit 3704f10f55

View file

@ -2634,7 +2634,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
int order = 100;
for (EntityAnswer answer : data.answers) {
order++;
popupMenu.getMenu().add(1, order, order, answer.name)
popupMenu.getMenu().add(Menu.FIRST, order, order, answer.name)
.setIcon(R.drawable.twotone_star_24)
.setIntent(new Intent().putExtra("id", answer.id));
}
@ -2642,10 +2642,12 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
popupMenu.insertIcons(context);
MenuCompat.setGroupDividerEnabled(popupMenu.getMenu(), true);
popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem target) {
if (target.getGroupId() == 1) {
if (target.getGroupId() == Menu.FIRST) {
startActivity(new Intent(context, ActivityCompose.class)
.putExtra("action", "reply")
.putExtra("reference", message.id)