Move account to feed sync outside of folder to feed sync since it was stripping feeds before they had a chance to get used.
This commit is contained in:
parent
f06d4f7ef9
commit
08e772cbd1
|
@ -146,17 +146,12 @@ extension NewsBlurAccountDelegate {
|
|||
|
||||
// Sync the folders
|
||||
for (folderName, folderRelationships) in newsBlurFolderDict {
|
||||
let newsBlurFolderFeedIDs = folderRelationships.map { String($0.feedID) }
|
||||
|
||||
// Handle account-level folder
|
||||
if folderName == " " {
|
||||
for feed in account.topLevelWebFeeds {
|
||||
if !newsBlurFolderFeedIDs.contains(feed.webFeedID) {
|
||||
account.removeWebFeed(feed)
|
||||
}
|
||||
}
|
||||
guard folderName != " " else {
|
||||
continue
|
||||
}
|
||||
|
||||
let newsBlurFolderFeedIDs = folderRelationships.map { String($0.feedID) }
|
||||
|
||||
guard let folder = folderDict[folderName] else { return }
|
||||
|
||||
// Move any feeds not in the folder to the account
|
||||
|
@ -182,6 +177,17 @@ extension NewsBlurAccountDelegate {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Handle the account level feeds
|
||||
if let folderRelationships = newsBlurFolderDict[" "] {
|
||||
let newsBlurFolderFeedIDs = folderRelationships.map { String($0.feedID) }
|
||||
for feed in account.topLevelWebFeeds {
|
||||
if !newsBlurFolderFeedIDs.contains(feed.webFeedID) {
|
||||
account.removeWebFeed(feed)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func clearFolderRelationship(for feed: WebFeed, withFolderName folderName: String) {
|
||||
|
|
Loading…
Reference in New Issue