Fix Introspect warning

This commit is contained in:
Thomas Ricouard 2023-07-18 13:58:00 +02:00
parent 4e1205dca8
commit 4a6f81f22e

View file

@ -57,7 +57,9 @@ public struct TimelineView: View {
.scrollContentBackground(.hidden)
.background(theme.primaryBackgroundColor)
.introspect(.list, on: .iOS(.v16, .v17)) { (collectionView: UICollectionView) in
self.collectionView = collectionView
DispatchQueue.main.async {
self.collectionView = collectionView
}
self.prefetcher.viewModel = viewModel
collectionView.isPrefetchingEnabled = true
collectionView.prefetchDataSource = self.prefetcher