mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
fix bug: constraint size not updated for frontsizeadjuster
This commit is contained in:
@@ -125,11 +125,12 @@ static NSCharacterSet *_defaultAvoidTruncationCharacterSet()
|
||||
_sizeIsCalculated = NO;
|
||||
_constrainedSize = constrainedSize;
|
||||
// If the context isn't created yet, it will be initialized with the appropriate size when next accessed.
|
||||
if (_context) {
|
||||
if (_context || _fontSizeAdjuster) {
|
||||
// If we're updating an existing context, make sure to use the same inset logic used during initialization.
|
||||
// This codepath allows us to reuse the
|
||||
CGSize shadowConstrainedSize = [[self shadower] insetSizeWithConstrainedSize:constrainedSize];
|
||||
_context.constrainedSize = shadowConstrainedSize;
|
||||
if (_context) _context.constrainedSize = shadowConstrainedSize;
|
||||
if (_fontSizeAdjuster) _fontSizeAdjuster.constrainedSize = shadowConstrainedSize;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user