Commit 1d15048
authored
fix: Ensure we're referencing up-to-date swipe state when configuring interaction enabled (#595)
For https://block.atlassian.net/browse/UI-9091
This resolves an issue where a cell would not respond to taps after the
"full swipe" swipe action trigger.
The issue was that we were referencing stale swipe state when
configuring `isUserInteractionEnabled`. It was quite unintuitive when
debugging this, but the line `swipeState = state` immediately resulted
in those variables holding different values while processing the swipe
action 🙃. We would incorrectly fall into the
`.willPerformFirstActionAutomatically` case, making the content view
unresponsive, despite the `swipeState` reporting as `.closed`.
The SwipeActionsViewController has also been updated to demonstrate this
is now working as expected.
### Checklist
Please do the following before merging:
- [ ] Ensure any public-facing changes are reflected in the
[changelog](https://github.com/square/Listable/blob/main/CHANGELOG.md).
Include them in the `Main` section.1 parent c60f018 commit 1d15048
3 files changed
Lines changed: 9 additions & 1 deletion
File tree
- Development/Sources/Demos/Demo Screens
- ListableUI/Sources/Internal
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
336 | 339 | | |
337 | 340 | | |
338 | 341 | | |
| |||
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
289 | 292 | | |
290 | | - | |
| 293 | + | |
291 | 294 | | |
292 | 295 | | |
293 | 296 | | |
| |||
0 commit comments