This works around a bug from ~iOS 14 that causes the last N items in a section to ignore any updates applied to them when N items are deleted from the same section and the items are at the end of the section.
This also removes the conversion of inserts/removals in to updates, which reduces the chances of this code being needed and also more closely matches the intent of the user; if something has truly moved or been updated the appropriate methods can be used, while removals and inserts that happen to result in the same position will not animate as a refresh.
This also fixes the crash that #6 was originally aiming to fix. It became much easier to reason about the changes once the reloads were not synthesised and were using the post-updates index paths.
I want to add more unit tests here and UI tests in ComposedUITests before merging this.
This is an improvement but it's not quite a fix yet.
I think the issue is in the transforming of the index paths. We probably need to work with a mixture of the current and the transformed index paths in
ChangesReducer.removeElements(at:) but I can't figure out the right mix and need to step away for a bit to clear my head of this, hopefully coming back with "fresh eyes."
I'm hoping this is a clearer API compared to using
The primary change here is to enable strict concurrency checks via
-Xfrontend -strict-concurrency=complete. The main knock-on effect of this is that
@MainActor has been added to most protocols and types.
- Bumped the Swift tools version to 5.7
- With this the
nameparameter on the dependency declaration has been deprecated
- With this the
- Removed support for all but
- We don't use any of the other view types so this has no impact on us, other than less to update and maintain
- We did rely on some of the extensions on
UITableView. The PR in the main repo now includes these extensions
ArraySectionhave been removed
- I planned to remove these soon because they make it harder to subclass, but these have been removed now because they were used for protocol conformances that cannot be satisfied with an actor-isolated function
- Explanation: When
assertMacroExpansionfails, it incorrectly displayed the expected source as the expanded source.
- Scope: The
- Risk: Very low, only changes the description in case of an
- Testing: Tested manually
- Issue: n/a
- Reviewer: @ahoppen on #1917
While using this function I was confused by the error message. I think it should include the actual expansion, not what's expected?
I also renamed the variable to try and make it a little clearer and (assuming this is correct) prevent a mistake like this again. This was done in 3c46da3712dec11e5d485c96b6b7d9d40b7c8f25 so can be easily reverted.
Initial support for caching values in-memory
Fix crash when multiple updates create publishers simultaneously