ASDisplayNode should bail early if a scheduled transition was invalidated before its block executes

- Idea borrowed from _enqueueAsyncSizingWithSentinel
This commit is contained in:
Huy Nguyen
2016-04-15 22:08:48 +03:00
parent a35647b200
commit 5a677915ba

View File

@@ -681,6 +681,10 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c)
});
void (^transitionBlock)() = ^{
if ([self _shouldAbortTransitionWithID:transitionID]) {
return;
}
ASLayout *newLayout;
{
ASLayoutableSetCurrentContext(ASLayoutableContextMake(transitionID, NO));