mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-09-09 22:20:41 +00:00
Trigger updating interfaceState for cells in case ASTableView or ASCollectionView becomes visible or invisible
This commit is contained in:
parent
07ad27c7f6
commit
084e6f82c1
@ -532,7 +532,7 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell";
|
|||||||
|
|
||||||
- (void)collectionView:(UICollectionView *)collectionView willDisplayCell:(_ASCollectionViewCell *)cell forItemAtIndexPath:(NSIndexPath *)indexPath
|
- (void)collectionView:(UICollectionView *)collectionView willDisplayCell:(_ASCollectionViewCell *)cell forItemAtIndexPath:(NSIndexPath *)indexPath
|
||||||
{
|
{
|
||||||
[_rangeController visibleNodeIndexPathsDidChangeWithScrollDirection:[self scrollDirection]];
|
[_rangeController visibleNodeIndexPathsDidChangeWithScrollDirection:self.scrollDirection];
|
||||||
|
|
||||||
if ([_asyncDelegate respondsToSelector:@selector(collectionView:willDisplayNodeForItemAtIndexPath:)]) {
|
if ([_asyncDelegate respondsToSelector:@selector(collectionView:willDisplayNodeForItemAtIndexPath:)]) {
|
||||||
[_asyncDelegate collectionView:self willDisplayNodeForItemAtIndexPath:indexPath];
|
[_asyncDelegate collectionView:self willDisplayNodeForItemAtIndexPath:indexPath];
|
||||||
@ -1081,6 +1081,9 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell";
|
|||||||
if (!visible && node.inHierarchy) {
|
if (!visible && node.inHierarchy) {
|
||||||
[node __exitHierarchy];
|
[node __exitHierarchy];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Trigger updating interfaceState for cells in case ASCollectionView becomes visible or invisible
|
||||||
|
[_rangeController visibleNodeIndexPathsDidChangeWithScrollDirection:self.scrollDirection];
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark - UICollectionView dead-end intercepts
|
#pragma mark - UICollectionView dead-end intercepts
|
||||||
|
@ -1056,6 +1056,9 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell";
|
|||||||
if (!visible && node.inHierarchy) {
|
if (!visible && node.inHierarchy) {
|
||||||
[node __exitHierarchy];
|
[node __exitHierarchy];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Trigger updating interfaceState for cells in case ASTableView becomes visible or invisible
|
||||||
|
[_rangeController visibleNodeIndexPathsDidChangeWithScrollDirection:self.scrollDirection];
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user