|
|
|
@ -1305,10 +1305,12 @@ class Core {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Log.i("Updating folder parents=" + parentFolders.size());
|
|
|
|
|
Log.i("Creating folders parents=" + parentFolders.size());
|
|
|
|
|
for (String parentName : parentFolders.keySet()) {
|
|
|
|
|
EntityFolder parent = nameFolder.get(parentName);
|
|
|
|
|
if (parent == null && parentName != null) {
|
|
|
|
|
parent = db.folder().getFolderByName(account.id, parentName);
|
|
|
|
|
if (parent == null) {
|
|
|
|
|
parent = new EntityFolder();
|
|
|
|
|
parent.account = account.id;
|
|
|
|
|
parent.name = parentName;
|
|
|
|
@ -1320,8 +1322,14 @@ class Core {
|
|
|
|
|
parent.keep_days = 0;
|
|
|
|
|
parent.selectable = false;
|
|
|
|
|
parent.id = db.folder().insertFolder(parent);
|
|
|
|
|
}
|
|
|
|
|
nameFolder.put(parentName, parent);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Log.i("Updating folders parents=" + parentFolders.size());
|
|
|
|
|
for (String parentName : parentFolders.keySet()) {
|
|
|
|
|
EntityFolder parent = nameFolder.get(parentName);
|
|
|
|
|
for (EntityFolder child : parentFolders.get(parentName))
|
|
|
|
|
db.folder().setFolderParent(child.id, parent == null ? null : parent.id);
|
|
|
|
|
}
|
|
|
|
|