fix: disable animation on Reset button in game picker

Wrap selectedIds.removeAll() in withTransaction with disablesAnimations
to prevent animation glitches when clearing all selections at once.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Trey t
2026-01-12 18:45:08 -06:00
parent d255e28dcc
commit cf939c4ba3

View File

@@ -1056,7 +1056,11 @@ struct GamePickerSheet: View {
ToolbarItem(placement: .cancellationAction) {
if !selectedIds.isEmpty {
Button("Reset") {
selectedIds.removeAll()
var transaction = Transaction()
transaction.disablesAnimations = true
withTransaction(transaction) {
selectedIds.removeAll()
}
}
.foregroundStyle(.red)
}