From 750a0969998f2c4238e34177375b895226963169 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beatrice=20Dellac=C3=A0?= Date: Wed, 28 Jan 2026 10:31:24 +0100 Subject: [PATCH] add delete menu --- MultiChrono/ContentView.swift | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/MultiChrono/ContentView.swift b/MultiChrono/ContentView.swift index 1811165..efa531a 100644 --- a/MultiChrono/ContentView.swift +++ b/MultiChrono/ContentView.swift @@ -156,6 +156,15 @@ struct StopwatchListItem: View { .padding(.vertical, 8) .background(Color(UIColor.systemBackground)) .contentShape(Rectangle()) + .contextMenu { + Button(role: .destructive) { + withAnimation { + viewModel.deleteStopwatch(id: stopwatch.id) + } + } label: { + Label("Delete", systemImage: "trash") + } + } .onDrag { self.draggingStopwatch = stopwatch return NSItemProvider(object: stopwatch.id.uuidString as NSString)