mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
[ASPagerNode] Fix content insets are wrong in pager node if root node of ASViewController and transition back (#2736)
* Fix content insets are wrong in pager node if root node of ASViewController and transition back * Add unit test * Improve test * Fix test * Move tests to ASPagerNodeTests
This commit is contained in:
committed by
appleguy
parent
d874eed78a
commit
57cd6a3ba8
@@ -1232,10 +1232,6 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell";
|
||||
|
||||
- (void)layoutSubviews
|
||||
{
|
||||
if (_zeroContentInsets) {
|
||||
self.contentInset = UIEdgeInsetsZero;
|
||||
}
|
||||
|
||||
// Flush any pending invalidation action if needed.
|
||||
ASCollectionViewInvalidationStyle invalidationStyle = _nextLayoutInvalidationStyle;
|
||||
_nextLayoutInvalidationStyle = ASCollectionViewInvalidationStyleNone;
|
||||
@@ -1254,6 +1250,10 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell";
|
||||
|
||||
// To ensure _maxSizeForNodesConstrainedSize is up-to-date for every usage, this call to super must be done last
|
||||
[super layoutSubviews];
|
||||
|
||||
if (_zeroContentInsets) {
|
||||
self.contentInset = UIEdgeInsetsZero;
|
||||
}
|
||||
|
||||
// Update range controller immediately if possible & needed.
|
||||
// Calling -updateIfNeeded in here with self.window == nil (early in the collection view's life)
|
||||
|
||||
Reference in New Issue
Block a user