Changed menu order

This commit is contained in:
M66B 2020-11-19 13:51:00 +01:00
parent 58d2bbee62
commit 605642ad31
1 changed files with 14 additions and 14 deletions

View File

@ -491,20 +491,6 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
popupMenu.getMenu().add(Menu.NONE, R.string.title_synchronize_now, order++, R.string.title_synchronize_now);
}
int childs = 0;
if (folder.child_refs != null)
for (TupleFolderEx child : folder.child_refs)
if (child.selectable)
childs++;
if (childs > 0) {
SubMenu submenu = popupMenu.getMenu()
.addSubMenu(Menu.NONE, Menu.NONE, order++, R.string.title_synchronize_subfolders);
submenu.add(Menu.FIRST, R.string.title_synchronize_now, 1, R.string.title_synchronize_now);
submenu.add(Menu.FIRST, R.string.title_synchronize_batch_enable, 2, R.string.title_synchronize_batch_enable);
submenu.add(Menu.FIRST, R.string.title_synchronize_batch_disable, 3, R.string.title_synchronize_batch_disable);
}
if (folder.selectable) {
if (folder.account != null && folder.accountProtocol == EntityAccount.TYPE_IMAP) {
popupMenu.getMenu().add(Menu.NONE, R.string.title_synchronize_more, order++, R.string.title_synchronize_more);
@ -562,6 +548,20 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
if (EntityFolder.INBOX.equals(folder.type) && folder.accountProtocol == EntityAccount.TYPE_POP)
popupMenu.getMenu().add(Menu.NONE, R.string.title_edit_rules, 11, R.string.title_edit_rules);
int childs = 0;
if (folder.child_refs != null)
for (TupleFolderEx child : folder.child_refs)
if (child.selectable)
childs++;
if (childs > 0) {
SubMenu submenu = popupMenu.getMenu()
.addSubMenu(Menu.NONE, Menu.NONE, order++, R.string.title_synchronize_subfolders);
submenu.add(Menu.FIRST, R.string.title_synchronize_now, 1, R.string.title_synchronize_now);
submenu.add(Menu.FIRST, R.string.title_synchronize_batch_enable, 2, R.string.title_synchronize_batch_enable);
submenu.add(Menu.FIRST, R.string.title_synchronize_batch_disable, 3, R.string.title_synchronize_batch_disable);
}
if (folder.account != null && folder.accountProtocol == EntityAccount.TYPE_IMAP)
popupMenu.getMenu().add(Menu.NONE, R.string.title_create_sub_folder, 16, R.string.title_create_sub_folder)
.setEnabled(folder.inferiors);