mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Add reloadData forward methods to ASCollectionNode
This commit is contained in:
@@ -18,4 +18,28 @@
|
||||
|
||||
@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
|
||||
|
||||
@@ -43,4 +43,21 @@
|
||||
[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
|
||||
|
||||
@@ -14,8 +14,6 @@
|
||||
|
||||
@property (weak, nonatomic) id<ASPagerNodeDataSource> dataSource;
|
||||
|
||||
- (void)reloadData;
|
||||
|
||||
- (void)setTuningParameters:(ASRangeTuningParameters)tuningParameters forRangeType:(ASLayoutRangeType)rangeType;
|
||||
|
||||
@end
|
||||
|
||||
@@ -49,11 +49,6 @@
|
||||
[self setTuningParameters:renderParams forRangeType:ASLayoutRangeTypeRender];
|
||||
}
|
||||
|
||||
- (void)reloadData
|
||||
{
|
||||
[self.view reloadData];
|
||||
}
|
||||
|
||||
- (void)setTuningParameters:(ASRangeTuningParameters)tuningParameters forRangeType:(ASLayoutRangeType)rangeType
|
||||
{
|
||||
[self.view setTuningParameters:tuningParameters forRangeType:rangeType];
|
||||
|
||||
Reference in New Issue
Block a user