mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Revert "fix scheduling issue that causes collectionView to not animate"
This commit is contained in:
@@ -694,7 +694,7 @@
|
||||
3C9C128419E616EF00E942A0 /* ASTableViewTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = ASTableViewTests.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
|
||||
430E7C8D1B4C23F100697A4C /* ASIndexPath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASIndexPath.h; sourceTree = "<group>"; };
|
||||
430E7C8E1B4C23F100697A4C /* ASIndexPath.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASIndexPath.m; sourceTree = "<group>"; };
|
||||
464052191A3F83C40061C0BA /* ASDataController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = ASDataController.h; sourceTree = "<group>"; };
|
||||
464052191A3F83C40061C0BA /* ASDataController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = ASDataController.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
4640521A1A3F83C40061C0BA /* ASDataController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = ASDataController.mm; sourceTree = "<group>"; };
|
||||
4640521B1A3F83C40061C0BA /* ASFlowLayoutController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASFlowLayoutController.h; sourceTree = "<group>"; };
|
||||
4640521C1A3F83C40061C0BA /* ASFlowLayoutController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ASFlowLayoutController.mm; sourceTree = "<group>"; };
|
||||
|
||||
@@ -916,7 +916,7 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell";
|
||||
- (void)rangeController:(ASRangeController *)rangeController didMoveSection:(NSInteger)fromIndex toSection:(NSInteger)toIndex
|
||||
{
|
||||
ASDisplayNodeAssertMainThread();
|
||||
LOG(@"UITableView moveSection:%ld", (long)fromIndex);
|
||||
LOG(@"UITableView moveSection:%@", indexSet);
|
||||
|
||||
|
||||
if (!self.asyncDataSource) {
|
||||
|
||||
@@ -448,10 +448,8 @@ static void *kASSizingQueueContext = &kASSizingQueueContext;
|
||||
if (_batchUpdateCounter == 0) {
|
||||
LOG(@"endUpdatesWithCompletion - beginning");
|
||||
|
||||
[_editingTransactionQueue addOperationWithBlock:^{
|
||||
[_mainSerialQueue performBlockOnMainThread:^{
|
||||
[_delegate dataControllerBeginUpdates:self];
|
||||
}];
|
||||
[_mainSerialQueue performBlockOnMainThread:^{
|
||||
[_delegate dataControllerBeginUpdates:self];
|
||||
}];
|
||||
|
||||
// Running these commands may result in blocking on an _editingTransactionQueue operation that started even before -beginUpdates.
|
||||
@@ -463,12 +461,8 @@ static void *kASSizingQueueContext = &kASSizingQueueContext;
|
||||
}];
|
||||
[_pendingEditCommandBlocks removeAllObjects];
|
||||
|
||||
[_editingTransactionQueue addOperationWithBlock:^{
|
||||
// scheduling this block on _editingTransactionQueue is crucial.
|
||||
// we must wait for all edit command blocks that happened before this one to schedule their main thread blocks first.
|
||||
[_mainSerialQueue performBlockOnMainThread:^{
|
||||
[_delegate dataController:self endUpdatesAnimated:animated completion:completion];
|
||||
}];
|
||||
[_mainSerialQueue performBlockOnMainThread:^{
|
||||
[_delegate dataController:self endUpdatesAnimated:animated completion:completion];
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user