mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-01 06:38:29 +02:00
Allow configuring account without drafts folder
This commit is contained in:
@@ -635,15 +635,14 @@ public class EmailService implements AutoCloseable {
|
||||
EntityFolder.guessTypes(folders, getStore().getDefaultFolder().getSeparator());
|
||||
|
||||
boolean inbox = false;
|
||||
boolean drafts = false;
|
||||
for (EntityFolder folder : folders)
|
||||
if (EntityFolder.INBOX.equals(folder.type))
|
||||
if (EntityFolder.INBOX.equals(folder.type)) {
|
||||
inbox = true;
|
||||
else if (EntityFolder.DRAFTS.equals(folder.type))
|
||||
drafts = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!inbox || !drafts)
|
||||
return null;
|
||||
if (!inbox)
|
||||
throw new IllegalArgumentException(context.getString(R.string.title_setup_no_inbox));
|
||||
|
||||
return folders;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user