Explorar o código

refactor: change from contextMenu to swipe action

Sam Jaffe hai 2 semanas
pai
achega
e99d7490db
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      Todos/View/ProjectPanelView.swift

+ 2 - 2
Todos/View/ProjectPanelView.swift

@@ -43,7 +43,7 @@ struct ProjectPanelView: View {
     List {
       ForEach($item.tasks) { task in
         TaskView(task: task)
-          .contextMenu {
+          .swipeActions {
             Button("Delete", systemImage: "trash", role: .destructive) {
               deleteItem(item: task.wrappedValue, from: item)
             }
@@ -51,7 +51,7 @@ struct ProjectPanelView: View {
 
         ForEach(task.subtasks) { subtask in
           SubTaskView(task: subtask)
-            .contextMenu {
+            .swipeActions {
               Button("Delete", systemImage: "trash", role: .destructive) {
                 deleteItem(item: subtask.wrappedValue, from: task.wrappedValue)
               }