mirror of
https://github.com/Instagram/IGListKit
synced 2026-05-24 09:48:21 +00:00
fixed IGListAdapterUpdater completion block animation transaction
Summary: * Issue: UIView animation blocks created within IGListAdapterUpdater's completion block work sporadically. Example: Direct message animation: https://pxl.cl/8sTk * Cause: completion block called within CATransaction begin/commit * Fix: commit CATransaction before calling completion block Reviewed By: rnystrom Differential Revision: D5592948 fbshipit-source-id: e7b20877b688a6a221a87b152ead830ccb34f12a
This commit is contained in:
parent
9e312275c3
commit
6f946b2981
2 changed files with 2 additions and 1 deletions
|
|
@ -9,6 +9,7 @@ The changelog for `IGListKit`. Also see the [releases](https://github.com/instag
|
|||
|
||||
- Prevent a crash when update queued immediately after item batch update. [Ryan Nystrom](https://github.com/rnystrom) (tbd)
|
||||
- Return correct `-[IGListAdapter visibleSectionControllers]` when section has no items, but has supplementary views. [Mani Ghasemlou](https://github.com/manicakes) [(#643)](https://github.com/Instagram/IGListKit/issues/643)
|
||||
- Call `[CATransaction commit]` before calling completion block in IGListAdapterUpdater to prevent animation issues. [Maxime Ollivier](https://github.com/maxoll) (tbd)
|
||||
|
||||
### Enhancements
|
||||
|
||||
|
|
|
|||
|
|
@ -235,8 +235,8 @@ static NSArray *objectsWithDuplicateIdentifiersRemoved(NSArray<id<IGListDiffable
|
|||
[collectionView performBatchUpdates:^{
|
||||
batchUpdatesBlock(result);
|
||||
} completion:^(BOOL finished) {
|
||||
batchUpdatesCompletionBlock(finished);
|
||||
[CATransaction commit];
|
||||
batchUpdatesCompletionBlock(finished);
|
||||
}];
|
||||
}
|
||||
} @catch (NSException *exception) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue