Check if local drafts folder exists

pull/214/head
M66B 2 years ago
parent ef01b879aa
commit 84351f6d8a

@ -2601,9 +2601,12 @@ class Core {
Log.i("Local folder count=" + local.size() + " drafts=" + drafts); Log.i("Local folder count=" + local.size() + " drafts=" + drafts);
if (!drafts) { if (!drafts) {
EntityFolder d = new EntityFolder(); 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.account = account.id;
d.name = context.getString(R.string.title_folder_local_drafts); d.name = ldrafts;
d.type = EntityFolder.DRAFTS; d.type = EntityFolder.DRAFTS;
d.local = true; d.local = true;
d.setProperties(); d.setProperties();
@ -2613,6 +2616,7 @@ class Core {
d.keep_days = Integer.MAX_VALUE; d.keep_days = Integer.MAX_VALUE;
db.folder().insertFolder(d); db.folder().insertFolder(d);
} }
}
if (!sync_folders) if (!sync_folders)
return; return;

Loading…
Cancel
Save