From 8cff6353a6bd7e6d3a193747f6b89f06f65e7a27 Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 3 Mar 2019 16:48:39 +0000 Subject: [PATCH] Auto fix inbox --- app/src/main/java/eu/faircode/email/Core.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/Core.java b/app/src/main/java/eu/faircode/email/Core.java index d86a7e3e9d..99ab0f98dc 100644 --- a/app/src/main/java/eu/faircode/email/Core.java +++ b/app/src/main/java/eu/faircode/email/Core.java @@ -794,6 +794,10 @@ class Core { db.folder().setFolderType(folder.id, type); else if (EntityFolder.SYSTEM.equals(folder.type) && EntityFolder.USER.equals(type)) db.folder().setFolderType(folder.id, type); + else if (EntityFolder.INBOX.equals(type) && !EntityFolder.INBOX.equals(folder.type)) { + if (db.folder().getFolderByType(folder.account, EntityFolder.INBOX) == null) + db.folder().setFolderType(folder.id, type); + } } } }