mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Add reloadData forward methods to ASCollectionNode
This commit is contained in:
@@ -18,4 +18,28 @@
|
|||||||
|
|
||||||
@property (nonatomic, readonly) ASCollectionView *view;
|
@property (nonatomic, readonly) ASCollectionView *view;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reload everything from scratch, destroying the working range and all cached nodes.
|
||||||
|
*
|
||||||
|
* @param completion block to run on completion of asynchronous loading or nil. If supplied, the block is run on
|
||||||
|
* the main thread.
|
||||||
|
* @warning This method is substantially more expensive than UICollectionView's version.
|
||||||
|
*/
|
||||||
|
- (void)reloadDataWithCompletion:(void (^)())completion;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reload everything from scratch, destroying the working range and all cached nodes.
|
||||||
|
*
|
||||||
|
* @warning This method is substantially more expensive than UICollectionView's version.
|
||||||
|
*/
|
||||||
|
- (void)reloadData;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reload everything from scratch entirely on the main thread, destroying the working range and all cached nodes.
|
||||||
|
*
|
||||||
|
* @warning This method is substantially more expensive than UICollectionView's version and will block the main thread
|
||||||
|
* while all the cells load.
|
||||||
|
*/
|
||||||
|
- (void)reloadDataImmediately;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
@@ -43,4 +43,21 @@
|
|||||||
[self.view clearFetchedData];
|
[self.view clearFetchedData];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma mark - ASCollectionView Forwards
|
||||||
|
|
||||||
|
- (void)reloadDataWithCompletion:(void (^)())completion
|
||||||
|
{
|
||||||
|
[self.view reloadDataWithCompletion:completion];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)reloadData
|
||||||
|
{
|
||||||
|
[self.view reloadData];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)reloadDataImmediately
|
||||||
|
{
|
||||||
|
[self.view reloadDataImmediately];
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
@@ -14,8 +14,6 @@
|
|||||||
|
|
||||||
@property (weak, nonatomic) id<ASPagerNodeDataSource> dataSource;
|
@property (weak, nonatomic) id<ASPagerNodeDataSource> dataSource;
|
||||||
|
|
||||||
- (void)reloadData;
|
|
||||||
|
|
||||||
- (void)setTuningParameters:(ASRangeTuningParameters)tuningParameters forRangeType:(ASLayoutRangeType)rangeType;
|
- (void)setTuningParameters:(ASRangeTuningParameters)tuningParameters forRangeType:(ASLayoutRangeType)rangeType;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
@@ -49,11 +49,6 @@
|
|||||||
[self setTuningParameters:renderParams forRangeType:ASLayoutRangeTypeRender];
|
[self setTuningParameters:renderParams forRangeType:ASLayoutRangeTypeRender];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)reloadData
|
|
||||||
{
|
|
||||||
[self.view reloadData];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)setTuningParameters:(ASRangeTuningParameters)tuningParameters forRangeType:(ASLayoutRangeType)rangeType
|
- (void)setTuningParameters:(ASRangeTuningParameters)tuningParameters forRangeType:(ASLayoutRangeType)rangeType
|
||||||
{
|
{
|
||||||
[self.view setTuningParameters:tuningParameters forRangeType:rangeType];
|
[self.view setTuningParameters:tuningParameters forRangeType:rangeType];
|
||||||
|
|||||||
Reference in New Issue
Block a user