mirror of https://github.com/M66B/FairEmail.git
Check if local drafts folder exists
This commit is contained in:
parent
ef01b879aa
commit
84351f6d8a
|
@ -2601,17 +2601,21 @@ class Core {
|
|||
Log.i("Local folder count=" + local.size() + " drafts=" + drafts);
|
||||
|
||||
if (!drafts) {
|
||||
EntityFolder d = new EntityFolder();
|
||||
d.account = account.id;
|
||||
d.name = context.getString(R.string.title_folder_local_drafts);
|
||||
d.type = EntityFolder.DRAFTS;
|
||||
d.local = true;
|
||||
d.setProperties();
|
||||
d.synchronize = false;
|
||||
d.download = false;
|
||||
d.sync_days = Integer.MAX_VALUE;
|
||||
d.keep_days = Integer.MAX_VALUE;
|
||||
db.folder().insertFolder(d);
|
||||
String ldrafts = context.getString(R.string.title_folder_local_drafts);
|
||||
EntityFolder d = db.folder().getFolderByName(account.id, ldrafts);
|
||||
if (d == null) {
|
||||
d = new EntityFolder();
|
||||
d.account = account.id;
|
||||
d.name = ldrafts;
|
||||
d.type = EntityFolder.DRAFTS;
|
||||
d.local = true;
|
||||
d.setProperties();
|
||||
d.synchronize = false;
|
||||
d.download = false;
|
||||
d.sync_days = Integer.MAX_VALUE;
|
||||
d.keep_days = Integer.MAX_VALUE;
|
||||
db.folder().insertFolder(d);
|
||||
}
|
||||
}
|
||||
|
||||
if (!sync_folders)
|
||||
|
|
Loading…
Reference in New Issue