mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Scrollable direction is invalid until a relayout. (#2375)
This commit is contained in:
committed by
Adlai Holler
parent
4595ebc06e
commit
9abae013a7
@@ -1368,7 +1368,13 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell";
|
|||||||
// If, for example, a vertical flow layout has its height changed due to a status bar
|
// If, for example, a vertical flow layout has its height changed due to a status bar
|
||||||
// appearance update, we do not need to relayout all nodes.
|
// appearance update, we do not need to relayout all nodes.
|
||||||
// For a more permanent fix to the unsafety mentioned above, see https://github.com/facebook/AsyncDisplayKit/pull/2182
|
// For a more permanent fix to the unsafety mentioned above, see https://github.com/facebook/AsyncDisplayKit/pull/2182
|
||||||
|
|
||||||
|
// If the bounds have changed, scrollable directions may be invalid until relayout has
|
||||||
|
// occurred.
|
||||||
|
[[self collectionViewLayout] invalidateLayout];
|
||||||
|
[self layoutIfNeeded];
|
||||||
ASScrollDirection scrollDirection = self.scrollableDirections;
|
ASScrollDirection scrollDirection = self.scrollableDirections;
|
||||||
|
|
||||||
BOOL fixedVertically = (ASScrollDirectionContainsVerticalDirection(scrollDirection) == NO);
|
BOOL fixedVertically = (ASScrollDirectionContainsVerticalDirection(scrollDirection) == NO);
|
||||||
BOOL fixedHorizontally = (ASScrollDirectionContainsHorizontalDirection(scrollDirection) == NO);
|
BOOL fixedHorizontally = (ASScrollDirectionContainsHorizontalDirection(scrollDirection) == NO);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user