From bdb322f7fc600a5651ab91be043eb0198cbe410e Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Tue, 18 Nov 2025 20:31:25 -0800 Subject: [PATCH] Do various code cleanups. --- Mac/AppDelegate.swift | 10 ++++------ iOS/AppDelegate.swift | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Mac/AppDelegate.swift b/Mac/AppDelegate.swift index 8519fb3dc..90b95369b 100644 --- a/Mac/AppDelegate.swift +++ b/Mac/AppDelegate.swift @@ -23,7 +23,7 @@ let appName = "NetNewsWire" @MainActor var appDelegate: AppDelegate! @main -final class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations, UNUserNotificationCenterDelegate, UnreadCountProvider, SPUStandardUserDriverDelegate, SPUUpdaterDelegate { +@MainActor final class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations, UNUserNotificationCenterDelegate, UnreadCountProvider, SPUStandardUserDriverDelegate, SPUUpdaterDelegate { static private let logger = Logger(subsystem: Bundle.main.bundleIdentifier!, category: "AppDelegate") @@ -37,11 +37,9 @@ final class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidat private var shuttingDown = false { didSet { if shuttingDown { - MainActor.assumeIsolated { - refreshTimer?.shuttingDown = shuttingDown - refreshTimer?.invalidate() - ArticleStatusSyncTimer.shared.stop() - } + refreshTimer?.shuttingDown = shuttingDown + refreshTimer?.invalidate() + ArticleStatusSyncTimer.shared.stop() } } } diff --git a/iOS/AppDelegate.swift b/iOS/AppDelegate.swift index 5865dc09f..410333d63 100644 --- a/iOS/AppDelegate.swift +++ b/iOS/AppDelegate.swift @@ -19,7 +19,7 @@ import Secrets @MainActor var appDelegate: AppDelegate! @main -final class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterDelegate, UnreadCountProvider { +@MainActor final class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterDelegate, UnreadCountProvider { private let backgroundTaskDispatchQueue = DispatchQueue.init(label: "BGTaskScheduler")