Use alternate drafts for quick setup

pull/159/head
M66B 6 years ago
parent 7c437d2a2d
commit 4a5235b4bf

@ -244,6 +244,7 @@ public class FragmentQuickSetup extends FragmentBase {
boolean inbox = false;
boolean drafts = false;
EntityFolder altDrafts = null;
for (Folder ifolder : istore.getDefaultFolder().list("*")) {
String fullName = ifolder.getFullName();
String[] attrs = ((IMAPFolder) ifolder).getAttributes();
@ -269,9 +270,16 @@ public class FragmentQuickSetup extends FragmentBase {
}
if (EntityFolder.DRAFTS.equals(type))
drafts = true;
if (folder.name.toLowerCase().contains("draft"))
altDrafts = folder;
}
}
if (!drafts && altDrafts != null) {
drafts = true;
altDrafts.type = EntityFolder.DRAFTS;
}
if (!inbox || !drafts)
throw new IllegalArgumentException(
context.getString(R.string.title_setup_no_settings, dparts[1]));

Loading…
Cancel
Save