mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Remove some no-longer-needed #available checks.
This commit is contained in:
@@ -396,16 +396,14 @@ private extension AppDelegate {
|
||||
}
|
||||
AccountManager.shared.refreshAll(errorHandler: ErrorHandler.log) { [unowned self] in
|
||||
if !AccountManager.shared.isSuspended {
|
||||
if #available(iOS 14, *) {
|
||||
try? WidgetDataEncoder.shared.encodeWidgetData()
|
||||
}
|
||||
try? WidgetDataEncoder.shared.encodeWidgetData()
|
||||
self.suspendApplication()
|
||||
os_log("Account refresh operation completed.", log: self.log, type: .info)
|
||||
task.setTaskCompleted(success: true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// set expiration handler
|
||||
task.expirationHandler = { [weak task] in
|
||||
DispatchQueue.main.sync {
|
||||
@@ -443,9 +441,7 @@ private extension AppDelegate {
|
||||
self.prepareAccountsForBackground()
|
||||
account!.syncArticleStatus(completion: { [weak self] _ in
|
||||
if !AccountManager.shared.isSuspended {
|
||||
if #available(iOS 14, *) {
|
||||
try? WidgetDataEncoder.shared.encodeWidgetData()
|
||||
}
|
||||
try? WidgetDataEncoder.shared.encodeWidgetData()
|
||||
self?.prepareAccountsForBackground()
|
||||
self?.suspendApplication()
|
||||
}
|
||||
@@ -472,9 +468,7 @@ private extension AppDelegate {
|
||||
account!.markArticles(article!, statusKey: .starred, flag: true) { _ in }
|
||||
account!.syncArticleStatus(completion: { [weak self] _ in
|
||||
if !AccountManager.shared.isSuspended {
|
||||
if #available(iOS 14, *) {
|
||||
try? WidgetDataEncoder.shared.encodeWidgetData()
|
||||
}
|
||||
try? WidgetDataEncoder.shared.encodeWidgetData()
|
||||
self?.prepareAccountsForBackground()
|
||||
self?.suspendApplication()
|
||||
}
|
||||
|
||||
@@ -65,9 +65,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
|
||||
}
|
||||
|
||||
func sceneDidEnterBackground(_ scene: UIScene) {
|
||||
if #available(iOS 14, *) {
|
||||
try? WidgetDataEncoder.shared.encodeWidgetData()
|
||||
}
|
||||
try? WidgetDataEncoder.shared.encodeWidgetData()
|
||||
ArticleStringFormatter.emptyCaches()
|
||||
appDelegate.prepareAccountsForBackground()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user