1
0
mirror of https://github.com/danog/Telegram.git synced 2024-12-03 09:57:46 +01:00
Telegram/Telegraph/TGAttachmentSheetRecentLayout.m
2015-10-01 19:19:52 +03:00

38 lines
934 B
Objective-C

#import "TGAttachmentSheetRecentLayout.h"
@interface TGAttachmentSheetRecentLayout ()
{
bool _updatingCollectionItems;
}
@end
@implementation TGAttachmentSheetRecentLayout
- (instancetype)init
{
self = [super init];
if (self != nil)
{
}
return self;
}
- (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