mirror of
https://github.com/danog/Telegram.git
synced 2024-12-03 09:57:46 +01:00
29 lines
866 B
Objective-C
29 lines
866 B
Objective-C
#import "TGStickerAssociatedPanelCollectionLayout.h"
|
|
|
|
@interface TGStickerAssociatedPanelCollectionLayout ()
|
|
{
|
|
bool _updatingCollectionItems;
|
|
}
|
|
|
|
@end
|
|
|
|
@implementation TGStickerAssociatedPanelCollectionLayout
|
|
|
|
- (UICollectionViewLayoutAttributes *)initialLayoutAttributesForAppearingItemAtIndexPath:(NSIndexPath *)itemIndexPath
|
|
{
|
|
if (_updatingCollectionItems || itemIndexPath.section != 0)
|
|
return [super initialLayoutAttributesForAppearingItemAtIndexPath:itemIndexPath];
|
|
|
|
return nil;
|
|
}
|
|
|
|
- (UICollectionViewLayoutAttributes *)finalLayoutAttributesForDisappearingItemAtIndexPath:(NSIndexPath *)itemIndexPath
|
|
{
|
|
if (_updatingCollectionItems || itemIndexPath.section != 0)
|
|
return [super finalLayoutAttributesForDisappearingItemAtIndexPath:itemIndexPath];
|
|
|
|
return [self layoutAttributesForItemAtIndexPath:itemIndexPath];
|
|
}
|
|
|
|
@end
|