Always use all-folders icon for unified inbox

This commit is contained in:
M66B 2022-11-06 20:03:23 +01:00
parent 89dbddaff4
commit 42b748cde0
1 changed files with 8 additions and 2 deletions

View File

@ -95,8 +95,10 @@ public class AdapterNavUnified extends RecyclerView.Adapter<AdapterNavUnified.Vi
}
private void bindTo(TupleFolderUnified folder) {
if (EntityFolder.INBOX.equals(folder.type) || folder.type == null)
ivItem.setImageResource(folder.folders > 1
if (folder.type == null)
ivItem.setImageResource(R.drawable.twotone_all_inbox_24);
else if (EntityFolder.INBOX.equals(folder.type))
ivItem.setImageResource(folder.folders > 1 && !folder.unified
? R.drawable.twotone_all_inbox_24
: R.drawable.twotone_move_to_inbox_24);
else if (EntityFolder.OUTBOX.equals(folder.type)) {
@ -261,6 +263,10 @@ public class AdapterNavUnified extends RecyclerView.Adapter<AdapterNavUnified.Vi
show = true;
}
TupleFolderUnified inbox = map.get(EntityFolder.INBOX);
if (inbox != null)
inbox.unified = true;
List<TupleFolderUnified> types = new ArrayList<>();
for (String type : map.keySet())
types.add(map.get(type));