Small behavior improvement

This commit is contained in:
M66B 2022-12-14 12:19:26 +01:00
parent 5a49d4b0d8
commit 5731e82b68
1 changed files with 4 additions and 3 deletions

View File

@ -5683,9 +5683,10 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
message.accountProtocol != EntityAccount.TYPE_IMAP);
int i = (message.importance == null ? EntityMessage.PRIORITIY_NORMAL : message.importance);
popupMenu.getMenu().findItem(R.id.menu_set_importance_low).setEnabled(!EntityMessage.PRIORITIY_LOW.equals(i));
popupMenu.getMenu().findItem(R.id.menu_set_importance_normal).setEnabled(!EntityMessage.PRIORITIY_NORMAL.equals(i));
popupMenu.getMenu().findItem(R.id.menu_set_importance_high).setEnabled(!EntityMessage.PRIORITIY_HIGH.equals(i));
boolean can = (message.uid != null || message.accountProtocol == EntityAccount.TYPE_POP);
popupMenu.getMenu().findItem(R.id.menu_set_importance_low).setEnabled(can && !EntityMessage.PRIORITIY_LOW.equals(i));
popupMenu.getMenu().findItem(R.id.menu_set_importance_normal).setEnabled(can && !EntityMessage.PRIORITIY_NORMAL.equals(i));
popupMenu.getMenu().findItem(R.id.menu_set_importance_high).setEnabled(can && !EntityMessage.PRIORITIY_HIGH.equals(i));
popupMenu.getMenu().findItem(R.id.menu_move_to)
.setEnabled(message.uid != null && !message.folderReadOnly)