mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-26 02:45:31 +01:00
Make sure there is an inbox
This commit is contained in:
@@ -963,11 +963,19 @@ public class EmailService implements AutoCloseable {
|
||||
if (ex.getMessage() != null &&
|
||||
ex.getMessage().contains("LIST processing failed")) {
|
||||
Log.w(ex);
|
||||
folders.add(new EntityFolder("Inbox", EntityFolder.INBOX));
|
||||
} else
|
||||
throw ex;
|
||||
}
|
||||
|
||||
boolean inbox = false;
|
||||
for (EntityFolder folder : folders)
|
||||
if (EntityFolder.INBOX.equals(folder.type)) {
|
||||
inbox = true;
|
||||
break;
|
||||
}
|
||||
if (!inbox)
|
||||
folders.add(new EntityFolder("Inbox", EntityFolder.INBOX));
|
||||
|
||||
return folders;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user