IGListKit/Source/IGListDiffKit
Maxime Ollivier cd3f84f227 fix crash when calling reloadObjects during an update
Summary:
Follow up to D47263265

## What's happening
We're calling `listAdapter.reloadObjects(...)` in the middle of the IGListKit's internal data update, so it's using the new section index path, instead of the old one. So we're going from a list of 2, insert at 0, and try to reload index 1, then we crash (it'll try to update index 2, which doesn't exist in the old array)

## Fix
Just like for `[IGListAdapter performBatchAnimated:updates:completion:]`, lets use the old index. To get this working, lets ask the updater if we're in an update, rather than `IGListAdapter` try to keep track of it.

Sorry the diff is a bit long, but in case this feels reasonable to pick, I might

Differential Revision: D47281472

fbshipit-source-id: 193153cfc15c87084b67f58c50e921db459d6800
2023-07-07 11:36:50 -07:00
..
Internal Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
IGListAssert.h Added new assertion level in IGListKit 2023-05-19 13:40:51 -07:00
IGListBatchUpdateData.h Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
IGListBatchUpdateData.mm Fix unsigned integer overflow (#1299) 2023-05-02 02:23:55 -07:00
IGListCompatibility.h Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
IGListDiff.h Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
IGListDiff.mm Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
IGListDiffable.h Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
IGListDiffKit.h Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
IGListExperiments.h fix crash when calling reloadObjects during an update 2023-07-07 11:36:50 -07:00
IGListIndexPathResult.h Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
IGListIndexPathResult.m Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
IGListIndexSetResult.h Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
IGListIndexSetResult.m Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
IGListMacros.h Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
IGListMoveIndex.h Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
IGListMoveIndex.m Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
IGListMoveIndexPath.h Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
IGListMoveIndexPath.m Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
NSNumber+IGListDiffable.h Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
NSNumber+IGListDiffable.m Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
NSString+IGListDiffable.h Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
NSString+IGListDiffable.m Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00