mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Add old transition API back but allow call from background thread (#2135)
This commit is contained in:
committed by
Adlai Holler
parent
7ef6c0ff2c
commit
f8e135a1be
@@ -126,7 +126,7 @@
|
||||
|
||||
XCTestExpectation *expectation = [self expectationWithDescription:@"Call measurement completion block on main"];
|
||||
|
||||
[displayNode transitionLayoutWithSizeRange:ASSizeRangeMake(CGSizeZero, CGSizeZero) animated:YES measurementCompletion:^{
|
||||
[displayNode transitionLayoutWithSizeRange:ASSizeRangeMake(CGSizeZero, CGSizeZero) animated:YES shouldMeasureAsync:YES measurementCompletion:^{
|
||||
XCTAssertTrue(ASDisplayNodeThreadIsMain(), @"Measurement completion block should be called on main thread");
|
||||
[expectation fulfill];
|
||||
}];
|
||||
@@ -207,7 +207,7 @@
|
||||
|
||||
node.layoutState = @2;
|
||||
[node invalidateCalculatedLayout];
|
||||
[node transitionLayoutAnimated:YES measurementCompletion:^{
|
||||
[node transitionLayoutWithAnimation:YES shouldMeasureAsync:YES measurementCompletion:^{
|
||||
// Push this to the next runloop to let async insertion / removing of nodes finished before checking
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
XCTAssertEqual(node.subnodes[0], node2);
|
||||
|
||||
Reference in New Issue
Block a user