mirror of https://github.com/M66B/FairEmail.git
Small fixes, refactoring
This commit is contained in:
parent
c7190d0a61
commit
bf09ca6844
|
@ -2187,7 +2187,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
|
|
||||||
View anchor = bnvActions.findViewById(R.id.action_reply);
|
View anchor = bnvActions.findViewById(R.id.action_reply);
|
||||||
PopupMenuLifecycle popupMenu = new PopupMenuLifecycle(context, powner, anchor);
|
PopupMenuLifecycle popupMenu = new PopupMenuLifecycle(context, powner, anchor);
|
||||||
popupMenu.inflate(R.menu.menu_reply);
|
popupMenu.inflate(R.menu.popup_reply);
|
||||||
popupMenu.getMenu().findItem(R.id.menu_reply_to_all).setVisible(recipients.length > 0);
|
popupMenu.getMenu().findItem(R.id.menu_reply_to_all).setVisible(recipients.length > 0);
|
||||||
popupMenu.getMenu().findItem(R.id.menu_reply_list).setVisible(message.list_post != null);
|
popupMenu.getMenu().findItem(R.id.menu_reply_list).setVisible(message.list_post != null);
|
||||||
popupMenu.getMenu().findItem(R.id.menu_reply_receipt).setVisible(message.receipt_to != null);
|
popupMenu.getMenu().findItem(R.id.menu_reply_receipt).setVisible(message.receipt_to != null);
|
||||||
|
@ -2399,7 +2399,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
|
|
||||||
View anchor = bnvActions.findViewById(R.id.action_more);
|
View anchor = bnvActions.findViewById(R.id.action_more);
|
||||||
PopupMenuLifecycle popupMenu = new PopupMenuLifecycle(context, powner, anchor);
|
PopupMenuLifecycle popupMenu = new PopupMenuLifecycle(context, powner, anchor);
|
||||||
popupMenu.inflate(R.menu.menu_message);
|
popupMenu.inflate(R.menu.popup_message_more);
|
||||||
|
|
||||||
popupMenu.getMenu().findItem(R.id.menu_editasnew).setEnabled(message.content);
|
popupMenu.getMenu().findItem(R.id.menu_editasnew).setEnabled(message.content);
|
||||||
|
|
||||||
|
|
|
@ -1530,13 +1530,13 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
||||||
PopupMenuLifecycle popupMenu = new PopupMenuLifecycle(getContext(), getViewLifecycleOwner(), vwAnchor);
|
PopupMenuLifecycle popupMenu = new PopupMenuLifecycle(getContext(), getViewLifecycleOwner(), vwAnchor);
|
||||||
|
|
||||||
if (message.ui_seen)
|
if (message.ui_seen)
|
||||||
popupMenu.getMenu().add(Menu.NONE, R.string.title_unseen, 2, R.string.title_unseen);
|
popupMenu.getMenu().add(Menu.NONE, R.string.title_unseen, 1, R.string.title_unseen);
|
||||||
else
|
else
|
||||||
popupMenu.getMenu().add(Menu.NONE, R.string.title_seen, 1, R.string.title_seen);
|
popupMenu.getMenu().add(Menu.NONE, R.string.title_seen, 1, R.string.title_seen);
|
||||||
|
|
||||||
popupMenu.getMenu().add(Menu.NONE, R.string.title_snooze, 3, R.string.title_snooze);
|
popupMenu.getMenu().add(Menu.NONE, R.string.title_snooze, 2, R.string.title_snooze);
|
||||||
popupMenu.getMenu().add(Menu.NONE, R.string.title_flag_color, 3, R.string.title_flag_color);
|
popupMenu.getMenu().add(Menu.NONE, R.string.title_flag_color, 3, R.string.title_flag_color);
|
||||||
popupMenu.getMenu().add(Menu.NONE, R.string.title_move, 3, R.string.title_move);
|
popupMenu.getMenu().add(Menu.NONE, R.string.title_move, 4, R.string.title_move);
|
||||||
|
|
||||||
popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
|
popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue