mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Change ASTableView's visibleNodes interface to return array of ASCellNodes (#1666)
This commit is contained in:
@@ -285,9 +285,9 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/**
|
||||
* Similar to -visibleCells.
|
||||
*
|
||||
* @returns an array containing the nodes being displayed on screen.
|
||||
* @returns an array containing the cell nodes being displayed on screen.
|
||||
*/
|
||||
- (NSArray<ASDisplayNode *> *)visibleNodes;
|
||||
- (NSArray<ASCellNode *> *)visibleNodes;
|
||||
|
||||
/**
|
||||
* YES to automatically adjust the contentOffset when cells are inserted or deleted "before"
|
||||
|
||||
@@ -389,11 +389,11 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell";
|
||||
return [_dataController indexPathForNode:cellNode];
|
||||
}
|
||||
|
||||
- (NSArray *)visibleNodes
|
||||
- (NSArray<ASCellNode *> *)visibleNodes
|
||||
{
|
||||
NSArray *indexPaths = [self visibleNodeIndexPathsForRangeController:_rangeController];
|
||||
|
||||
NSMutableArray *visibleNodes = [NSMutableArray array];
|
||||
NSMutableArray<ASCellNode *> *visibleNodes = [NSMutableArray array];
|
||||
for (NSIndexPath *indexPath in indexPaths) {
|
||||
ASCellNode *node = [self nodeForRowAtIndexPath:indexPath];
|
||||
if (node) {
|
||||
|
||||
Reference in New Issue
Block a user