From 2514b58a96ccb73b4feea8f74a2367c72ba824c8 Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Thu, 16 Jul 2026 00:18:53 -0500 Subject: 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. --- Hutch/Views/Lists/MailingListListView.swift | 6 +++++- 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 -- cgit v1.2.3