mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-25 01:01:21 +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 {
|
||||
didAddFeed = folder.addFeed(uniquedFeed)
|
||||
if didAddFeed {
|
||||
addToFeedDictionaries(uniquedFeed)
|
||||
}
|
||||
}
|
||||
else {
|
||||
if !topLevelObjectsContainsFeed(uniquedFeed) {
|
||||
children += [uniquedFeed]
|
||||
addToFeedDictionaries(uniquedFeed)
|
||||
dirty = true
|
||||
postChildrenDidChangeNotification()
|
||||
}
|
||||
didAddFeed = true
|
||||
}
|
||||
|
||||
if didAddFeed {
|
||||
addToFeedDictionaries(uniquedFeed)
|
||||
dirty = true
|
||||
}
|
||||
|
||||
rebuildFeedDictionaries()
|
||||
return didAddFeed // TODO
|
||||
return didAddFeed
|
||||
}
|
||||
|
||||
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 {
|
||||
return
|
||||
}
|
||||
rebuildFeedDictionaries()
|
||||
importOPMLItems(children, parentFolder: nil)
|
||||
dirty = true
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user