Commit 8f0d651
committed
Potential fix for invalidation crashes
As mentioned in #13 and #8 there are some scenarios where the collection view’s data is out-of-sync with the data in composed.
As mentioned in #13 calling `layoutIfNeeded` can trigger the data to be in sync again. In this I have added it to `mappingWillBeginUpdating(_:)` which _appears_ to solve the problem.
It might be needed in `replace(sectionProvider:)` (because `reloadData` is called) and/or `mappingDidInvalidate(_:)` (for the same reason) but I’m still investigating.1 parent 8ee5b11 commit 8f0d651
File tree
1 file changed
+1
-0
lines changed- Sources/ComposedUI/CollectionView
1 file changed
+1
-0
lines changedLines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
| 220 | + | |
220 | 221 | | |
221 | 222 | | |
222 | 223 | | |
| |||
0 commit comments