mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
reordered conditionals, moved beta things to beta header file
This commit is contained in:
@@ -15,4 +15,16 @@
|
||||
*/
|
||||
@property (nonatomic, copy) NSArray *pointSizeScaleFactors;
|
||||
|
||||
#pragma mark - ASTextKit Customization
|
||||
/**
|
||||
A block to provide a hook to provide a custom NSLayoutManager to the ASTextKitRenderer
|
||||
*/
|
||||
@property (nonatomic, copy) NSLayoutManager * (^layoutManagerCreationBlock)(void);
|
||||
|
||||
/**
|
||||
A block to provide a hook to provide a NSTextStorage to the Text Kit's layout manager.
|
||||
*/
|
||||
@property (nonatomic, copy) NSTextStorage * (^textStorageCreationBlock)(NSAttributedString *attributedString);
|
||||
|
||||
|
||||
@end
|
||||
@@ -213,17 +213,6 @@ typedef NS_ENUM(NSUInteger, ASTextNodeHighlightStyle) {
|
||||
*/
|
||||
@property (nonatomic, assign) BOOL passthroughNonlinkTouches;
|
||||
|
||||
#pragma mark - ASTextKit Customization
|
||||
/**
|
||||
A block to provide a hook to provide a custom NSLayoutManager to the ASTextKitRenderer
|
||||
*/
|
||||
@property (nonatomic, copy) NSLayoutManager * (^layoutManagerCreationBlock)(void);
|
||||
|
||||
/**
|
||||
A block to provide a hook to provide a NSTextStorage to the Text Kit's layout manager.
|
||||
*/
|
||||
@property (nonatomic, copy) NSTextStorage * (^textStorageCreationBlock)(NSAttributedString *attributedString);
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
|
||||
@@ -139,7 +139,7 @@ static NSCharacterSet *_defaultAvoidTruncationCharacterSet()
|
||||
{
|
||||
[self truncater];
|
||||
// if we have no scale factors or an unconstrained width, there is no reason to try to adjust the font size
|
||||
if ([_attributes.pointSizeScaleFactors count] > 0 && isinf(_constrainedSize.width) == NO) {
|
||||
if (isinf(_constrainedSize.width) == NO && [_attributes.pointSizeScaleFactors count] > 0) {
|
||||
_currentScaleFactor = [[self fontSizeAdjuster] scaleFactor];
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ static NSCharacterSet *_defaultAvoidTruncationCharacterSet()
|
||||
ASDisplayNodeAssertNotNil(context, @"This is no good without a context.");
|
||||
|
||||
// This renderer may not be the one that did the sizing. If that is the case its _currentScaleFactor will not be set, so we should compute it now
|
||||
if ([_attributes.pointSizeScaleFactors count] > 0 && isinf(_constrainedSize.width) == NO && _sizeIsCalculated == NO) {
|
||||
if (_sizeIsCalculated == NO && isinf(_constrainedSize.width) == NO && [_attributes.pointSizeScaleFactors count] > 0) {
|
||||
_currentScaleFactor = [[self fontSizeAdjuster] scaleFactor];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user