mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-01 02:21:37 +01:00
Use alternate drafts for quick setup
This commit is contained in:
@@ -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]));
|
||||
|
||||
Reference in New Issue
Block a user