mirror of
https://github.com/Instagram/IGListKit
synced 2026-05-23 09:18:29 +00:00
fix update queueing when using reload fallback
Summary: If we fallback to `reloadData`, we don't queue the next update. That means if you call `performUpdate` multiple times quickly, there's a chance that the last update doesn't take effect. Reviewed By: Haud Differential Revision: D22219237 fbshipit-source-id: 167e3428859a0194f8f8c57624504edd531480df
This commit is contained in:
parent
29bf582f47
commit
a70d2d70ae
2 changed files with 6 additions and 0 deletions
|
|
@ -18,6 +18,8 @@ The changelog for `IGListKit`. Also see the [releases](https://github.com/instag
|
|||
|
||||
- Fixed `IGListAdapterUpdaterDelegate` by 1) calling `willReloadDataWithCollectionView` on fallback reloads and 2) making sure `willPerformBatchUpdatesWithCollectionView` is only called when performing a batch update. [Maxime Ollivier](https://github.com/maxolls) (tbd)
|
||||
|
||||
- Fixed missing update when calling `performUpdatesAnimated` multiple times quickly and using the `reloadDataFallback()`. [Maxime Ollivier](https://github.com/maxolls) (tbd)
|
||||
|
||||
4.0.0
|
||||
-----
|
||||
### Breaking Changes
|
||||
|
|
|
|||
|
|
@ -179,6 +179,10 @@
|
|||
[collectionView layoutIfNeeded];
|
||||
executeCompletionBlocks(YES);
|
||||
[delegate listAdapterUpdater:self didReloadDataWithCollectionView:collectionView isFallbackReload:YES];
|
||||
|
||||
// queue another update in case something changed during batch updates. this method will bail next runloop if
|
||||
// there are no changes
|
||||
[self _queueUpdateWithCollectionViewBlock:collectionViewBlock];
|
||||
};
|
||||
|
||||
// disables multiple performBatchUpdates: from happening at the same time
|
||||
|
|
|
|||
Loading…
Reference in a new issue