mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Revert "fix scheduling issue that causes collectionView to not animate"
This commit is contained in:
@@ -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