Fix bug where empty folders would be lost between runs of the app.
This commit is contained in:
parent
75199d2546
commit
f5d6e7e8fa
|
@ -762,20 +762,18 @@ private extension Account {
|
|||
return
|
||||
}
|
||||
|
||||
guard item.isFolder, let itemChildren = item.children else {
|
||||
return
|
||||
}
|
||||
|
||||
// TODO: possibly support sub folders.
|
||||
|
||||
guard let folderName = item.titleFromAttributes else {
|
||||
// Folder doesn’t have a name, so it won’t be created, and its items will go one level up.
|
||||
importOPMLItems(itemChildren, parentFolder: parentFolder)
|
||||
if let itemChildren = item.children {
|
||||
importOPMLItems(itemChildren, parentFolder: parentFolder)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if let folder = ensureFolder(with: folderName) {
|
||||
importOPMLItems(itemChildren, parentFolder: folder)
|
||||
if let itemChildren = item.children {
|
||||
importOPMLItems(itemChildren, parentFolder: folder)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue