From 2123142ad038baad4dede4a05d18409ebf57579a Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 16 Nov 2022 08:04:16 +0100 Subject: [PATCH] Skip showing user unified folders --- .../eu/faircode/email/AdapterNavUnified.java | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/AdapterNavUnified.java b/app/src/main/java/eu/faircode/email/AdapterNavUnified.java index 0ad63f4a2c..20698f2be0 100644 --- a/app/src/main/java/eu/faircode/email/AdapterNavUnified.java +++ b/app/src/main/java/eu/faircode/email/AdapterNavUnified.java @@ -227,20 +227,22 @@ public class AdapterNavUnified extends RecyclerView.Adapter(folders)) { TupleFolderUnified f = map.get(type.type); - if (f == null) - map.put(type.type, type); - else { - f.folders += type.folders; - f.messages += type.messages; - f.unseen += type.unseen; + if (!EntityFolder.SYSTEM.equals(type.type) && + !EntityFolder.USER.equals(type.type)) + if (f == null) + map.put(type.type, type); + else { + f.folders += type.folders; + f.messages += type.messages; + f.unseen += type.unseen; - if (Objects.equals(f.color, type.color) || - (f.color == null && f.folders == type.folders)) { - f.color = type.color; - f.colorCount += type.colorCount; - } else - f.colorCount++; - } + if (Objects.equals(f.color, type.color) || + (f.color == null && f.folders == type.folders)) { + f.color = type.color; + f.colorCount += type.colorCount; + } else + f.colorCount++; + } if (type.unified) { unified.folders += type.folders;