From 12d5c73325f488196ec350f44dff234e5eceba15 Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Sat, 20 Feb 2016 12:22:39 -0800 Subject: [PATCH] [ASTextNode] Remove thread affinity dispatch --- AsyncDisplayKit/ASTextNode.mm | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/AsyncDisplayKit/ASTextNode.mm b/AsyncDisplayKit/ASTextNode.mm index 3c0d7797b0..d333d88b06 100644 --- a/AsyncDisplayKit/ASTextNode.mm +++ b/AsyncDisplayKit/ASTextNode.mm @@ -366,22 +366,20 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; // We need an entirely new renderer [self _invalidateRenderer]; - ASDisplayNodeRespectThreadAffinityOfNode(self, ^{ - // Tell the display node superclasses that the cached layout is incorrect now - [self invalidateCalculatedLayout]; + // Tell the display node superclasses that the cached layout is incorrect now + [self invalidateCalculatedLayout]; - [self setNeedsDisplay]; + [self setNeedsDisplay]; - self.accessibilityLabel = _attributedString.string; + self.accessibilityLabel = _attributedString.string; + + if (_attributedString.length == 0) { + // We're not an accessibility element by default if there is no string. + self.isAccessibilityElement = NO; + } else { + self.isAccessibilityElement = YES; + } - if (_attributedString.length == 0) { - // We're not an accessibility element by default if there is no string. - self.isAccessibilityElement = NO; - } else { - self.isAccessibilityElement = YES; - } - }); - // reset the scale factor if we get a new string. _currentScaleFactor = 0; if (attributedString.length > 0) {