Fixes “non-sendable type 'Notification?' cannot cross actor boundary” warning

This commit is contained in:
Riley Testut
2023-05-30 13:00:18 -05:00
committed by Magesh K
parent 68a87f55bf
commit f19ae2f422

View File

@@ -1494,7 +1494,8 @@ private extension MyAppsViewController
if #available(iOS 15, *) if #available(iOS 15, *)
{ {
for await _ in NotificationCenter.default.notifications(named: AppManager.didFetchSourceNotification) // .map { $0.name } to avoid "non-sendable type 'Notification?' cannot cross actor boundary" warning.
for await _ in NotificationCenter.default.notifications(named: AppManager.didFetchSourceNotification).map({ $0.name })
{ {
// Wait until _after_ didFetchSourceNotification // Wait until _after_ didFetchSourceNotification
// to prevent incorrect update() animations. // to prevent incorrect update() animations.