mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-12-01 18:10:16 +00:00
Remove most uses of forEach. (Note: not talking about SwiftUI ForEach, which is fine and good and should not be removed.)
This commit is contained in:
1 parent
2d045b6c0f
commit
a9b4efeaab
31 files changed
+141
-105
No files matched your search
@@ -493,8 +493,10 @@ final class MainFeedCollectionViewController: UICollectionViewController, Undoab
|
||||
}
|
||||
|
||||
func applyToAvailableCells(_ completion: (MainFeedCollectionViewCell, IndexPath) -> Void) {
|
||||
collectionView.visibleCells.forEach { cell in
|
||||
guard let indexPath = collectionView.indexPath(for: cell) else { return }
|
||||
for cell in collectionView.visibleCells {
|
||||
guard let indexPath = collectionView.indexPath(for: cell) else {
|
||||
continue
|
||||
}
|
||||
if let cell = collectionView.cellForItem(at: indexPath) as? MainFeedCollectionViewCell {
|
||||
completion(cell, indexPath)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user