@@ -129,7 +129,7 @@ public struct ASCollectionView<SectionID: Hashable>: UIViewControllerRepresentab
129129
130130 // MARK: Private tracking variables
131131
132- private var hasMovedToParent = true
132+ private var hasDoneInitialSetup = true
133133 private var hasSetInitialScrollPosition = false
134134
135135 private var hasFiredBoundaryNotificationForBoundary : Set < Boundary > = [ ]
@@ -277,7 +277,7 @@ public struct ASCollectionView<SectionID: Hashable>: UIViewControllerRepresentab
277277
278278 func populateDataSource( animated: Bool = true , transaction: Transaction ? = nil )
279279 {
280- guard hasMovedToParent else { return }
280+ guard hasDoneInitialSetup else { return }
281281 collectionViewController. map { registerSupplementaries ( forCollectionView: $0. collectionView) } // New sections might involve new types of supplementary...
282282 let snapshot = ASDiffableDataSourceSnapshot ( sections:
283283 parent. sections. map {
@@ -293,7 +293,7 @@ public struct ASCollectionView<SectionID: Hashable>: UIViewControllerRepresentab
293293
294294 func updateContent( _ cv: UICollectionView , transaction: Transaction ? )
295295 {
296- guard hasMovedToParent else { return }
296+ guard hasDoneInitialSetup else { return }
297297
298298 let transactionAnimationEnabled = ( transaction? . animation != nil ) && !( transaction? . disablesAnimations ?? false )
299299 populateDataSource (
@@ -330,9 +330,9 @@ public struct ASCollectionView<SectionID: Hashable>: UIViewControllerRepresentab
330330
331331 func onMoveToParent( )
332332 {
333- guard !hasMovedToParent else { return }
333+ guard !hasDoneInitialSetup else { return }
334334
335- hasMovedToParent = true
335+ hasDoneInitialSetup = true
336336 populateDataSource ( animated: false )
337337 }
338338
@@ -465,7 +465,7 @@ public struct ASCollectionView<SectionID: Hashable>: UIViewControllerRepresentab
465465 func updateLayout( )
466466 {
467467 guard
468- hasMovedToParent ,
468+ hasDoneInitialSetup ,
469469 let collectionViewController = collectionViewController else { return }
470470 // Configure any custom layout
471471 parent. layout. configureLayout ( layoutObject: collectionViewController. collectionView. collectionViewLayout)
@@ -474,15 +474,15 @@ public struct ASCollectionView<SectionID: Hashable>: UIViewControllerRepresentab
474474 if parent. shouldRecreateLayoutOnStateChange
475475 {
476476 let newLayout = parent. layout. makeLayout ( withCoordinator: self )
477- collectionViewController. collectionView. setCollectionViewLayout ( newLayout, animated: parent. shouldAnimateRecreatedLayoutOnStateChange && hasMovedToParent )
477+ collectionViewController. collectionView. setCollectionViewLayout ( newLayout, animated: parent. shouldAnimateRecreatedLayoutOnStateChange && hasDoneInitialSetup )
478478 }
479479 // If enabled, invalidate the layout
480480 else if parent. shouldInvalidateLayoutOnStateChange
481481 {
482482 let changes = {
483483 collectionViewController. collectionViewLayout. invalidateLayout ( )
484484 }
485- if parent. shouldAnimateInvalidatedLayoutOnStateChange, hasMovedToParent
485+ if parent. shouldAnimateInvalidatedLayoutOnStateChange, hasDoneInitialSetup
486486 {
487487 UIView . animate (
488488 withDuration: 0.4 ,
0 commit comments