1
0
mirror of https://github.com/danog/Telegram.git synced 2024-12-04 02:17:51 +01:00
Telegram/Telegraph/TGAttachmentSheetRecentLayout.m

38 lines
934 B
Mathematica
Raw Normal View History

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