Check if local drafts folder exists

pull/214/head
M66B 12 months ago
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…
Cancel
Save