diff options
| author | Christian Cleberg <[email protected]> | 2026-07-16 00:18:53 -0500 |
|---|---|---|
| committer | Christian Cleberg <[email protected]> | 2026-07-16 00:18:53 -0500 |
| commit | 2514b58a96ccb73b4feea8f74a2367c72ba824c8 (patch) | |
| tree | b6fe0e06cf19d3b646766cd4cfab91f48eddf4ce /Hutch/Views | |
| parent | 76cb006b87d30928ec23a3c4bf95bd145aad8e9c (diff) | |
| download | hutch-2514b58a96ccb73b4feea8f74a2367c72ba824c8.tar.gz hutch-2514b58a96ccb73b4feea8f74a2367c72ba824c8.tar.bz2 hutch-2514b58a96ccb73b4feea8f74a2367c72ba824c8.zip | |
fix: stop destructive swipes animating rows out before confirmation
Swiping to delete made the row vanish and then spring back while the
confirmation was still on screen. A destructive swipe action left to full-swipe
performs itself on the gesture and animates the row away, but these actions only
set pending state and wait for an answer, so the row returned when the data had
not changed.
allowsFullSwipe: false, which PasteListView already uses for exactly this
confirm-then-delete shape. Both new swipes had the same omission.
Diffstat (limited to 'Hutch/Views')
| -rw-r--r-- | Hutch/Views/Lists/MailingListListView.swift | 6 | ||||
| -rw-r--r-- | Hutch/Views/Repositories/ArtifactsView.swift | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/Hutch/Views/Lists/MailingListListView.swift b/Hutch/Views/Lists/MailingListListView.swift index cc811df..77df89b 100644 --- a/Hutch/Views/Lists/MailingListListView.swift +++ b/Hutch/Views/Lists/MailingListListView.swift @@ -367,7 +367,11 @@ struct MailingListListView: View { } .padding(.vertical, 2) } - .swipeActions(edge: .trailing) { + // allowsFullSwipe: false, as in PasteListView. A destructive + // action left to full-swipe animates the row out on the gesture, + // before the confirmation is answered, so it flickers back when + // the data has not actually changed. + .swipeActions(edge: .trailing, allowsFullSwipe: false) { if isOwned(mailingList) { Button(role: .destructive) { pendingDeletion = mailingList diff --git a/Hutch/Views/Repositories/ArtifactsView.swift b/Hutch/Views/Repositories/ArtifactsView.swift index 264a51e..037c092 100644 --- a/Hutch/Views/Repositories/ArtifactsView.swift +++ b/Hutch/Views/Repositories/ArtifactsView.swift @@ -22,7 +22,9 @@ struct ArtifactsView: View { ArtifactRow(artifact: artifact) { openURL(artifact.url) } - .swipeActions(edge: .trailing) { + // See MailingListListView: a full-swipe destructive + // action animates the row out before the confirmation. + .swipeActions(edge: .trailing, allowsFullSwipe: false) { if isOwnedByCurrentUser { Button(role: .destructive) { pendingDeletion = artifact |
