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:
@@ -154,9 +154,11 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
|
||||
// MARK: - API
|
||||
|
||||
@MainActor func manualRefresh(errorHandler: @escaping (Error) -> ()) {
|
||||
UIApplication.shared.connectedScenes.compactMap( { $0.delegate as? SceneDelegate } ).forEach {
|
||||
$0.cleanUp(conditional: true)
|
||||
let sceneDelegates = UIApplication.shared.connectedScenes.compactMap{ $0.delegate as? SceneDelegate }
|
||||
for sceneDelegate in sceneDelegates {
|
||||
sceneDelegate.cleanUp(conditional: true)
|
||||
}
|
||||
|
||||
AccountManager.shared.refreshAll(errorHandler: errorHandler)
|
||||
}
|
||||
|
||||
|
||||
@@ -576,8 +576,11 @@ extension ArticleViewController: UIPageViewControllerDelegate {
|
||||
|
||||
coordinator.selectArticle(article, animations: [.select, .scroll, .navigation])
|
||||
articleExtractorButton.buttonState = currentWebViewController?.articleExtractorButtonState ?? .off
|
||||
|
||||
previousViewControllers.compactMap({ $0 as? WebViewController }).forEach({ $0.stopWebViewActivity() })
|
||||
|
||||
let webViewControllers = previousViewControllers.compactMap{ $0 as? WebViewController }
|
||||
for webViewController in webViewControllers {
|
||||
webViewController.stopWebViewActivity()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user