I think you found work solution, by the way:
Task {
await MatchHistoryController.shared.fetchMatchRecords()
if Task.isCancelled == false else { return }
await MainActor.run { [weak self] in self?.dataSource.apply(self.initialSnapshot(), animatingDifferences: false) }
}
But what about if you need to apply datasource in global queue, and do it in UIViewController which bordered as @MainActor :)
I have got warn UICollectionViewDiffableDataSource is not @Sendable :)
Topic:
UI Frameworks
SubTopic:
UIKit
Tags: