diff --git a/AutoCat.xcodeproj/project.pbxproj b/AutoCat.xcodeproj/project.pbxproj index 46b9c57..bc18b3c 100644 --- a/AutoCat.xcodeproj/project.pbxproj +++ b/AutoCat.xcodeproj/project.pbxproj @@ -1653,7 +1653,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = AutoCat/AutoCat.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 136; + CURRENT_PROJECT_VERSION = 137; DEVELOPMENT_TEAM = 46DTTB8X4S; INFOPLIST_FILE = AutoCat/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = AutoCat; @@ -1680,7 +1680,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = AutoCat/AutoCat.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 136; + CURRENT_PROJECT_VERSION = 137; DEVELOPMENT_TEAM = 46DTTB8X4S; INFOPLIST_FILE = AutoCat/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = AutoCat; diff --git a/AutoCat/Controllers/CheckController.swift b/AutoCat/Controllers/CheckController.swift index d603a89..0014437 100644 --- a/AutoCat/Controllers/CheckController.swift +++ b/AutoCat/Controllers/CheckController.swift @@ -56,7 +56,11 @@ class CheckController: UIViewController, UITableViewDelegate, UISearchResultsUpd } self.history.delegate = self - NotificationCenter.default.addObserver(self, selector:#selector(self.calendarDayDidChange(_:)), name:NSNotification.Name.NSCalendarDayChanged, object:nil) + + NotificationCenter.default.addObserver(forName: .NSCalendarDayChanged, + object: nil, + queue: .main, + using: calendarDayDidChange) } override func viewWillDisappear(_ animated: Bool) { @@ -118,9 +122,9 @@ class CheckController: UIViewController, UITableViewDelegate, UISearchResultsUpd } } - @objc private func calendarDayDidChange(_ notification : NSNotification) { - DispatchQueue.main.async { - self.historyDataSource.reload() + nonisolated private func calendarDayDidChange(_ notification : Notification) { + MainActor.assumeIsolated { + historyDataSource.reload() } }