mirror of
https://github.com/danog/Telegram.git
synced 2024-12-03 09:57:46 +01:00
38 lines
934 B
Objective-C
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
|