1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-28 02:37:16 +00:00

Show important icon in lists only

This commit is contained in:
M66B 2024-01-22 11:56:04 +01:00
parent cd8bd3eae6
commit 95669e72fa

View file

@ -978,10 +978,15 @@ public class FragmentMessages extends FragmentBase
if (!ch && !dh)
return null;
if (EntityMessage.PRIORITIY_HIGH.equals(message.importance)) {
Integer importance =
(viewType == AdapterMessage.ViewType.UNIFIED ||
viewType == AdapterMessage.ViewType.FOLDER
? message.importance : null);
if (EntityMessage.PRIORITIY_HIGH.equals(importance)) {
if (pos > 0)
return null;
} else if (EntityMessage.PRIORITIY_LOW.equals(message.importance)) {
} else if (EntityMessage.PRIORITIY_LOW.equals(importance)) {
if (prev != null && EntityMessage.PRIORITIY_LOW.equals(prev.importance))
return null;
} else if (pos > 0) {
@ -1031,9 +1036,9 @@ public class FragmentMessages extends FragmentBase
vSeparator.setVisibility(View.GONE);
}
if (EntityMessage.PRIORITIY_HIGH.equals(message.importance))
if (EntityMessage.PRIORITIY_HIGH.equals(importance))
tvDate.setText(R.string.title_important);
else if (EntityMessage.PRIORITIY_LOW.equals(message.importance))
else if (EntityMessage.PRIORITIY_LOW.equals(importance))
tvDate.setText(R.string.title_unimportant);
else
tvDate.setText(date_week