2015-10-01 18:19:52 +02:00
|
|
|
#import "TGStickerAssociatedPanelCollectionLayout.h"
|
2014-07-10 16:11:09 +02:00
|
|
|
|
2015-10-01 18:19:52 +02:00
|
|
|
@interface TGStickerAssociatedPanelCollectionLayout ()
|
2014-07-10 16:11:09 +02:00
|
|
|
{
|
|
|
|
bool _updatingCollectionItems;
|
|
|
|
}
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
2015-10-01 18:19:52 +02:00
|
|
|
@implementation TGStickerAssociatedPanelCollectionLayout
|
2014-07-10 16:11:09 +02:00
|
|
|
|
|
|
|
- (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
|