mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
ensure that the truncater is initialized before the context is in _calculateSize
This commit is contained in:
@@ -103,8 +103,6 @@ static NSCharacterSet *_defaultAvoidTruncationCharacterSet()
|
||||
constrainedSize:shadowConstrainedSize
|
||||
layoutManagerFactory:attributes.layoutManagerFactory
|
||||
layoutManagerDelegate:attributes.layoutManagerDelegate];
|
||||
|
||||
[self truncater];
|
||||
}
|
||||
return _context;
|
||||
}
|
||||
@@ -138,6 +136,7 @@ static NSCharacterSet *_defaultAvoidTruncationCharacterSet()
|
||||
|
||||
- (void)_calculateSize
|
||||
{
|
||||
[self truncater];
|
||||
if (_attributes.minimumScaleFactor < 1 && _attributes.minimumScaleFactor > 0) {
|
||||
[[self fontSizeAdjuster] adjustFontSize];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user