@@ -467,11 +467,10 @@ export class CollectionView extends CollectionViewBase {
467467 return this . orientation === 'horizontal' ;
468468 }
469469
470- public clearCachedSize ( ...indexes :number [ ] ) {
470+ public clearCachedSize ( ...indexes : number [ ] ) {
471471 const sizes : NSMutableArray < NSValue > = this . _delegate instanceof UICollectionViewDelegateImpl ? this . _delegate . cachedSizes : null ;
472472 if ( sizes ) {
473- indexes . forEach ( index => sizes . replaceObjectAtIndexWithObject ( index , NSValue . valueWithCGSize ( CGSizeZero ) ) )
474-
473+ indexes . forEach ( ( index ) => sizes . replaceObjectAtIndexWithObject ( index , NSValue . valueWithCGSize ( CGSizeZero ) ) ) ;
475474 }
476475 }
477476
@@ -488,7 +487,7 @@ export class CollectionView extends CollectionViewBase {
488487 // this.clearCellSize();
489488
490489 const sizes : NSMutableArray < NSValue > = this . _delegate instanceof UICollectionViewDelegateImpl ? this . _delegate . cachedSizes : null ;
491- const performBatchUpdatesCompletion = ( c ) => {
490+ const performBatchUpdatesCompletion = ( c ) => {
492491 // if we are not "presented" (viewController hidden) then performBatchUpdatesCompletion would crash
493492 const viewIsLoaded = ! ! this . page ?. viewController ? ! ! this . page . viewController . view . window : true ;
494493 if ( viewIsLoaded ) {
@@ -706,7 +705,7 @@ export class CollectionView extends CollectionViewBase {
706705 return ;
707706 }
708707 const nbItems = nativeView . numberOfItemsInSection ( 0 ) ;
709- if ( nbItems > 0 && index < nbItems ) {
708+ if ( nbItems > 0 && index < nbItems ) {
710709 let scrollPosition = UICollectionViewScrollPosition . Top ;
711710 if ( this . orientation === 'vertical' ) {
712711 scrollPosition = snap === SnapPosition . START ? UICollectionViewScrollPosition . Top : UICollectionViewScrollPosition . Bottom ;
@@ -1178,10 +1177,15 @@ class UICollectionViewFlowLayoutImpl extends UICollectionViewFlowLayout {
11781177 layout . _owner = new WeakRef ( owner ) ;
11791178 return layout ;
11801179 }
1181- invalidationContextForInteractivelyMovingItemsWithTargetPositionPreviousIndexPathsPreviousPosition ( targetIndexPaths : NSArray < NSIndexPath > , targetPosition : CGPoint , previousIndexPaths : NSArray < NSIndexPath > , previousPosition : CGPoint ) : UICollectionViewLayoutInvalidationContext {
1182- const owner = this . _owner ?. get ( )
1180+ invalidationContextForInteractivelyMovingItemsWithTargetPositionPreviousIndexPathsPreviousPosition (
1181+ targetIndexPaths : NSArray < NSIndexPath > ,
1182+ targetPosition : CGPoint ,
1183+ previousIndexPaths : NSArray < NSIndexPath > ,
1184+ previousPosition : CGPoint
1185+ ) : UICollectionViewLayoutInvalidationContext {
1186+ const owner = this . _owner ?. get ( ) ;
11831187 if ( owner && targetIndexPaths . count ) {
1184- owner . clearCachedSize ( targetIndexPaths . objectAtIndex ( 0 ) . row , previousIndexPaths . objectAtIndex ( 0 ) . row )
1188+ owner . clearCachedSize ( targetIndexPaths . objectAtIndex ( 0 ) . row , previousIndexPaths . objectAtIndex ( 0 ) . row ) ;
11851189 // owner.clearCachedSize(previousIndexPaths.objectAtIndex(0).row)
11861190 }
11871191 return super . invalidationContextForInteractivelyMovingItemsWithTargetPositionPreviousIndexPathsPreviousPosition ( targetIndexPaths , targetPosition , previousIndexPaths , previousPosition ) ;
@@ -1294,7 +1298,7 @@ class CollectionViewDataSource extends NSObject implements UICollectionViewDataS
12941298
12951299// @NativeClass
12961300// class UICollectionViewDropDelegateImpl extends NSObject implements UICollectionViewDropDelegate {
1297-
1301+
12981302// public static ObjCProtocols = [UICollectionViewDropDelegate];
12991303
13001304// _owner: WeakRef<CollectionView>;
@@ -1426,7 +1430,7 @@ class UICollectionViewDelegateImpl extends UICollectionViewCacheDelegateFlowLayo
14261430 owner . scrollViewDidEndScrollingAnimation ( scrollView ) ;
14271431 }
14281432 }
1429- collectionViewTargetIndexPathForMoveFromItemAtIndexPathToProposedIndexPath ( collectionView : UICollectionView , currentIndexPath : NSIndexPath , proposedIndexPath : NSIndexPath ) : NSIndexPath {
1433+ collectionViewTargetIndexPathForMoveFromItemAtIndexPathToProposedIndexPath ( collectionView : UICollectionView , currentIndexPath : NSIndexPath , proposedIndexPath : NSIndexPath ) : NSIndexPath {
14301434 if ( currentIndexPath === proposedIndexPath ) {
14311435 return proposedIndexPath ;
14321436 }
@@ -1436,7 +1440,7 @@ class UICollectionViewDelegateImpl extends UICollectionViewCacheDelegateFlowLayo
14361440 }
14371441 owner . _reorderItemInSource ( currentIndexPath . row , proposedIndexPath . row , false ) ;
14381442 owner . clearCachedSize ( currentIndexPath . row , proposedIndexPath . row ) ;
1439-
1443+
14401444 return proposedIndexPath ;
14411445 }
14421446}
@@ -1501,7 +1505,7 @@ class UICollectionViewDelegateFixedSizeImpl extends NSObject implements UICollec
15011505 owner . scrollViewDidEndScrollingAnimation ( scrollView ) ;
15021506 }
15031507 }
1504- collectionViewTargetIndexPathForMoveFromItemAtIndexPathToProposedIndexPath ( collectionView : UICollectionView , currentIndexPath : NSIndexPath , proposedIndexPath : NSIndexPath ) : NSIndexPath {
1508+ collectionViewTargetIndexPathForMoveFromItemAtIndexPathToProposedIndexPath ( collectionView : UICollectionView , currentIndexPath : NSIndexPath , proposedIndexPath : NSIndexPath ) : NSIndexPath {
15051509 if ( currentIndexPath === proposedIndexPath ) {
15061510 return proposedIndexPath ;
15071511 }
@@ -1511,7 +1515,7 @@ class UICollectionViewDelegateFixedSizeImpl extends NSObject implements UICollec
15111515 }
15121516 owner . _reorderItemInSource ( currentIndexPath . row , proposedIndexPath . row , false ) ;
15131517 owner . clearCachedSize ( currentIndexPath . row , proposedIndexPath . row ) ;
1514-
1518+
15151519 return proposedIndexPath ;
15161520 }
15171521}
0 commit comments