mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Add missing instance variables in ASTextNode and warnings cleanup #trivial (#984)
* Add missing instance variables in ASTextNode and warnings cleanup * Re-add drain
This commit is contained in:
committed by
GitHub
parent
37e82132be
commit
b82128ee4e
@@ -216,6 +216,6 @@ AS_EXTERN void ASDisplayNodeDisableHierarchyNotifications(ASDisplayNode *node);
|
|||||||
AS_EXTERN void ASDisplayNodeEnableHierarchyNotifications(ASDisplayNode *node);
|
AS_EXTERN void ASDisplayNodeEnableHierarchyNotifications(ASDisplayNode *node);
|
||||||
|
|
||||||
// Not to be called directly.
|
// Not to be called directly.
|
||||||
AS_EXTERN void _ASSetDebugNames(Class owningClass, NSString *names, ASDisplayNode *object, ...);
|
AS_EXTERN void _ASSetDebugNames(Class owningClass, NSString *names, ASDisplayNode * _Nullable object, ...);
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
@@ -65,6 +65,11 @@ static void runLoopSourceCallback(void *info) {
|
|||||||
ASDisplayNodeFailAssert(@"Abstract method.");
|
ASDisplayNodeFailAssert(@"Abstract method.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)drain
|
||||||
|
{
|
||||||
|
ASDisplayNodeFailAssert(@"Abstract method.");
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation ASDeallocQueueV1 {
|
@implementation ASDeallocQueueV1 {
|
||||||
|
|||||||
@@ -191,7 +191,12 @@ static ASTextKitRenderer *rendererForAttributes(ASTextKitAttributes attributes,
|
|||||||
|
|
||||||
NSAttributedString *_attributedText;
|
NSAttributedString *_attributedText;
|
||||||
NSAttributedString *_truncationAttributedText;
|
NSAttributedString *_truncationAttributedText;
|
||||||
|
NSAttributedString *_additionalTruncationMessage;
|
||||||
NSAttributedString *_composedTruncationText;
|
NSAttributedString *_composedTruncationText;
|
||||||
|
NSArray<NSNumber *> *_pointSizeScaleFactors;
|
||||||
|
NSLineBreakMode _truncationMode;
|
||||||
|
|
||||||
|
NSUInteger _maximumNumberOfLines;
|
||||||
|
|
||||||
NSString *_highlightedLinkAttributeName;
|
NSString *_highlightedLinkAttributeName;
|
||||||
id _highlightedLinkAttributeValue;
|
id _highlightedLinkAttributeValue;
|
||||||
@@ -1175,6 +1180,11 @@ static NSAttributedString *DefaultTruncationAttributedString()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (NSAttributedString *)additionalTruncationMessage
|
||||||
|
{
|
||||||
|
return ASLockedSelf(_additionalTruncationMessage);
|
||||||
|
}
|
||||||
|
|
||||||
- (void)setTruncationMode:(NSLineBreakMode)truncationMode
|
- (void)setTruncationMode:(NSLineBreakMode)truncationMode
|
||||||
{
|
{
|
||||||
if (ASLockedSelfCompareAssign(_truncationMode, truncationMode)) {
|
if (ASLockedSelfCompareAssign(_truncationMode, truncationMode)) {
|
||||||
@@ -1182,18 +1192,28 @@ static NSAttributedString *DefaultTruncationAttributedString()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (NSLineBreakMode)truncationMode
|
||||||
|
{
|
||||||
|
return ASLockedSelf(_truncationMode);
|
||||||
|
}
|
||||||
|
|
||||||
- (BOOL)isTruncated
|
- (BOOL)isTruncated
|
||||||
{
|
{
|
||||||
return ASLockedSelf([[self _locked_renderer] isTruncated]);
|
return ASLockedSelf([[self _locked_renderer] isTruncated]);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setPointSizeScaleFactors:(NSArray *)pointSizeScaleFactors
|
- (void)setPointSizeScaleFactors:(NSArray<NSNumber *> *)pointSizeScaleFactors
|
||||||
{
|
{
|
||||||
if (ASLockedSelfCompareAssignCopy(_pointSizeScaleFactors, pointSizeScaleFactors)) {
|
if (ASLockedSelfCompareAssignCopy(_pointSizeScaleFactors, pointSizeScaleFactors)) {
|
||||||
[self setNeedsDisplay];
|
[self setNeedsDisplay];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (NSArray<NSNumber *> *)pointSizeScaleFactors
|
||||||
|
{
|
||||||
|
return ASLockedSelf(_pointSizeScaleFactors);
|
||||||
|
}
|
||||||
|
|
||||||
- (void)setMaximumNumberOfLines:(NSUInteger)maximumNumberOfLines
|
- (void)setMaximumNumberOfLines:(NSUInteger)maximumNumberOfLines
|
||||||
{
|
{
|
||||||
if (ASLockedSelfCompareAssign(_maximumNumberOfLines, maximumNumberOfLines)) {
|
if (ASLockedSelfCompareAssign(_maximumNumberOfLines, maximumNumberOfLines)) {
|
||||||
@@ -1201,6 +1221,11 @@ static NSAttributedString *DefaultTruncationAttributedString()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (NSUInteger)maximumNumberOfLines
|
||||||
|
{
|
||||||
|
return ASLockedSelf(_maximumNumberOfLines);
|
||||||
|
}
|
||||||
|
|
||||||
- (NSUInteger)lineCount
|
- (NSUInteger)lineCount
|
||||||
{
|
{
|
||||||
return ASLockedSelf([[self _locked_renderer] lineCount]);
|
return ASLockedSelf([[self _locked_renderer] lineCount]);
|
||||||
|
|||||||
@@ -950,7 +950,7 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ];
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSArray *)pointSizeScaleFactors
|
- (NSArray<NSNumber *> *)pointSizeScaleFactors
|
||||||
{
|
{
|
||||||
return ASLockedSelf(_pointSizeScaleFactors);
|
return ASLockedSelf(_pointSizeScaleFactors);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user