From 8ad6d7bb3333afaecffd0ab07a48f03c080d9eaa Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 17 Sep 2019 10:47:36 +0200 Subject: [PATCH] Skip setting folder display name --- app/src/main/java/eu/faircode/email/Core.java | 8 -------- 1 file changed, 8 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/Core.java b/app/src/main/java/eu/faircode/email/Core.java index 909f20ddca..777f7d0658 100644 --- a/app/src/main/java/eu/faircode/email/Core.java +++ b/app/src/main/java/eu/faircode/email/Core.java @@ -902,16 +902,12 @@ class Core { for (Folder ifolder : ifolders) { String fullName = ifolder.getFullName(); String[] name = fullName.split(Pattern.quote(Character.toString(separator))); - String childName = name[name.length - 1]; boolean subscribed = subscription.contains(fullName); String[] attr = ((IMAPFolder) ifolder).getAttributes(); String type = EntityFolder.getType(attr, fullName, false); boolean selectable = !Arrays.asList(attr).contains("\\Noselect") && ((ifolder.getType() & IMAPFolder.HOLDS_MESSAGES) != 0); - if (EntityFolder.INBOX.equals(type) || fullName.equals(childName)) - childName = null; - Log.i(account.name + ":" + fullName + " subscribed=" + subscribed + " type=" + type + " attrs=" + TextUtils.join(" ", attr)); @@ -927,7 +923,6 @@ class Core { folder = new EntityFolder(); folder.account = account.id; folder.name = fullName; - folder.display = childName; folder.type = (EntityFolder.SYSTEM.equals(type) ? type : EntityFolder.USER); folder.synchronize = false; folder.subscribed = subscribed; @@ -943,9 +938,6 @@ class Core { if (folder.subscribed == null || !folder.subscribed.equals(subscribed)) db.folder().setFolderSubscribed(folder.id, subscribed); - if (folder.display == null && childName != null) - db.folder().setFolderDisplay(folder.id, childName); - // Compatibility if (EntityFolder.USER.equals(folder.type) && EntityFolder.SYSTEM.equals(type)) db.folder().setFolderType(folder.id, type);