Make sure there is an inbox

master
M66B 4 months ago
parent 1d0f95f59a
commit 2b68df5281

@ -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;
}

Loading…
Cancel
Save