diff --git a/Mac/AppDelegate.swift b/Mac/AppDelegate.swift index 21364dbe6..cf3b42868 100644 --- a/Mac/AppDelegate.swift +++ b/Mac/AppDelegate.swift @@ -749,7 +749,9 @@ extension AppDelegate { @IBAction func debugDropConditionalGetInfo(_ sender: Any?) { #if DEBUG - AccountManager.shared.activeAccounts.forEach{ $0.debugDropConditionalGetInfo() } + for account in AccountManager.shared.activeAccounts { + account.debugDropConditionalGetInfo() + } #endif } diff --git a/Mac/MainWindow/Sidebar/SidebarOutlineDataSource.swift b/Mac/MainWindow/Sidebar/SidebarOutlineDataSource.swift index d0a26f28e..662c6f80b 100644 --- a/Mac/MainWindow/Sidebar/SidebarOutlineDataSource.swift +++ b/Mac/MainWindow/Sidebar/SidebarOutlineDataSource.swift @@ -370,14 +370,14 @@ private extension SidebarOutlineDataSource { return false } - draggedFeeds.forEach { pasteboardFeed in + for pasteboardFeed in draggedFeeds { guard let sourceAccountID = pasteboardFeed.accountID, let sourceAccount = AccountManager.shared.existingAccount(with: sourceAccountID), let feedID = pasteboardFeed.feedID, let feed = sourceAccount.existingFeed(withFeedID: feedID), let destinationContainer = parentNode.representedObject as? Container else { - return + continue } var sourceContainer: Container = sourceAccount // default to top level, @@ -475,14 +475,14 @@ private extension SidebarOutlineDataSource { return false } - draggedFolders.forEach { pasteboardFolder in + for pasteboardFolder in draggedFolders { guard let sourceAccountID = pasteboardFolder.accountID, let sourceAccount = AccountManager.shared.existingAccount(with: sourceAccountID), let folderStringID = pasteboardFolder.folderID, let folderID = Int(folderStringID), let folder = sourceAccount.existingFolder(withID: folderID) else { - return + continue } if !sameAccount(pasteboardFolder, parentNode) { copyFolderBetweenAccounts(folder: folder, to: parentNode) diff --git a/Mac/MainWindow/Timeline/TimelineViewController.swift b/Mac/MainWindow/Timeline/TimelineViewController.swift index ff7d2e73d..efe49661c 100644 --- a/Mac/MainWindow/Timeline/TimelineViewController.swift +++ b/Mac/MainWindow/Timeline/TimelineViewController.swift @@ -1139,7 +1139,7 @@ private extension TimelineViewController { func updateArticleRowMap() { var rowMap = [String: [Int]]() var index = 0 - articles.forEach { (article) in + for article in articles { if var indexes = rowMap[article.articleID] { indexes.append(index) rowMap[article.articleID] = indexes @@ -1160,9 +1160,9 @@ private extension TimelineViewController { func indexesForArticleIDs(_ articleIDs: Set) -> IndexSet { var indexes = IndexSet() - articleIDs.forEach { (articleID) in + for articleID in articleIDs { guard let rowsIndex = rows(for: articleID) else { - return + continue } for rowIndex in rowsIndex { indexes.insert(rowIndex)