mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Replace uses of forEach with for-in loops.
This commit is contained in:
@@ -759,7 +759,7 @@ private extension FeedbinAccountDelegate {
|
||||
// Feedbin has a tag that we don't have a folder for. We might not get a new
|
||||
// taggings response for it if it is a folder rename. Force expire the tagging
|
||||
// so that we will for sure get the new tagging information.
|
||||
tags.forEach { tag in
|
||||
for tag in tags {
|
||||
if !folderNames.contains(tag.name) {
|
||||
accountMetadata?.conditionalGetInfo[FeedbinAPICaller.ConditionalGetKeys.taggings] = nil
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ extension NewsBlurAccountDelegate {
|
||||
|
||||
// Delete any folders not at NewsBlur
|
||||
if let folders = account.folders {
|
||||
folders.forEach { folder in
|
||||
for folder in folders {
|
||||
if !folderNames.contains(folder.name ?? "") {
|
||||
for feed in folder.topLevelFeeds {
|
||||
account.addFeed(feed)
|
||||
@@ -66,7 +66,7 @@ extension NewsBlurAccountDelegate {
|
||||
|
||||
// Make any folders NewsBlur has, but we don't
|
||||
// Ignore account-level folder
|
||||
folderNames.forEach { folderName in
|
||||
for folderName in folderNames {
|
||||
if !accountFolderNames.contains(folderName) && folderName != " " {
|
||||
_ = account.ensureFolder(with: folderName)
|
||||
}
|
||||
@@ -100,7 +100,7 @@ extension NewsBlurAccountDelegate {
|
||||
|
||||
// Add any feeds we don't have and update any we do
|
||||
var feedsToAdd = Set<NewsBlurFeed>()
|
||||
feeds.forEach { newsBlurFeed in
|
||||
for newsBlurFeed in feeds {
|
||||
let subFeedID = String(newsBlurFeed.feedID)
|
||||
|
||||
if let feed = account.existingFeed(withFeedID: subFeedID) {
|
||||
@@ -117,7 +117,7 @@ extension NewsBlurAccountDelegate {
|
||||
}
|
||||
|
||||
// Actually add feeds all in one go, so we don’t trigger various rebuilding things that Account does.
|
||||
feedsToAdd.forEach { newsBlurFeed in
|
||||
for newsBlurFeed in feedsToAdd {
|
||||
let feed = account.createFeed(with: newsBlurFeed.name, url: newsBlurFeed.feedURL, feedID: String(newsBlurFeed.feedID), homePageURL: newsBlurFeed.homePageURL)
|
||||
feed.externalID = String(newsBlurFeed.feedID)
|
||||
account.addFeed(feed)
|
||||
|
||||
Reference in New Issue
Block a user