mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
expose relayoutAllNodes at ASCollectionView level (#1683)
* expose relayoutAllNodes at ASCollectionView level * rename relayoutAllNodes to relayoutItems to be more UIKit centric
This commit is contained in:
@@ -164,6 +164,12 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
*/
|
||||
- (void)reloadDataImmediately;
|
||||
|
||||
/**
|
||||
* Triggers a relayout of all nodes.
|
||||
*
|
||||
*/
|
||||
- (void)relayoutItems;
|
||||
|
||||
/**
|
||||
* Blocks execution of the main thread until all section and row updates are committed. This method must be called from the main thread.
|
||||
*/
|
||||
|
||||
@@ -313,6 +313,11 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell";
|
||||
[super reloadData];
|
||||
}
|
||||
|
||||
- (void)relayoutItems
|
||||
{
|
||||
[_dataController relayoutAllNodes];
|
||||
}
|
||||
|
||||
- (void)waitUntilAllUpdatesAreCommitted
|
||||
{
|
||||
ASDisplayNodeAssertMainThread();
|
||||
|
||||
@@ -134,6 +134,12 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
*/
|
||||
- (void)reloadDataImmediately;
|
||||
|
||||
/**
|
||||
* Triggers a relayout of all nodes.
|
||||
*
|
||||
*/
|
||||
- (void)relayoutItems;
|
||||
|
||||
/**
|
||||
* begins a batch of insert, delete reload and move operations. This method must be called from the main thread.
|
||||
*/
|
||||
|
||||
@@ -354,6 +354,11 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell";
|
||||
[super reloadData];
|
||||
}
|
||||
|
||||
- (void)relayoutItems
|
||||
{
|
||||
[_dataController relayoutAllNodes];
|
||||
}
|
||||
|
||||
- (void)setTuningParameters:(ASRangeTuningParameters)tuningParameters forRangeType:(ASLayoutRangeType)rangeType
|
||||
{
|
||||
[_layoutController setTuningParameters:tuningParameters forRangeMode:ASLayoutRangeModeFull rangeType:rangeType];
|
||||
|
||||
Reference in New Issue
Block a user