mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-01-13 18:23:19 +01:00
Fix OPML import performance regression. Fix #238.
This commit is contained in:
parent
0b4a9f143e
commit
3eb95ce63d
@ -240,22 +240,21 @@ public final class Account: DisplayNameProvider, UnreadCountProvider, Container,
|
|||||||
|
|
||||||
if let folder = folder {
|
if let folder = folder {
|
||||||
didAddFeed = folder.addFeed(uniquedFeed)
|
didAddFeed = folder.addFeed(uniquedFeed)
|
||||||
if didAddFeed {
|
|
||||||
addToFeedDictionaries(uniquedFeed)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if !topLevelObjectsContainsFeed(uniquedFeed) {
|
if !topLevelObjectsContainsFeed(uniquedFeed) {
|
||||||
children += [uniquedFeed]
|
children += [uniquedFeed]
|
||||||
addToFeedDictionaries(uniquedFeed)
|
|
||||||
dirty = true
|
|
||||||
postChildrenDidChangeNotification()
|
postChildrenDidChangeNotification()
|
||||||
}
|
}
|
||||||
didAddFeed = true
|
didAddFeed = true
|
||||||
}
|
}
|
||||||
|
|
||||||
rebuildFeedDictionaries()
|
if didAddFeed {
|
||||||
return didAddFeed // TODO
|
addToFeedDictionaries(uniquedFeed)
|
||||||
|
dirty = true
|
||||||
|
}
|
||||||
|
|
||||||
|
return didAddFeed
|
||||||
}
|
}
|
||||||
|
|
||||||
public func createFeed(with name: String?, editedName: String?, url: String) -> Feed? {
|
public func createFeed(with name: String?, editedName: String?, url: String) -> Feed? {
|
||||||
@ -301,6 +300,7 @@ public final class Account: DisplayNameProvider, UnreadCountProvider, Container,
|
|||||||
guard let children = opmlDocument.children else {
|
guard let children = opmlDocument.children else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
rebuildFeedDictionaries()
|
||||||
importOPMLItems(children, parentFolder: nil)
|
importOPMLItems(children, parentFolder: nil)
|
||||||
dirty = true
|
dirty = true
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user