Commit d44bb7d211
Unsigned
Layout: unified · split
LibreTasks/ContentView.swift +10 −1
| @@ -96,12 +96,21 @@ struct ContentView: View { | |||
| 96 | Spacer() | 96 | Spacer() |
| 97 | (Text("[#") + Text(task.taskPriority) + Text("]")) | 97 | (Text("[#") + Text(task.taskPriority) + Text("]")) |
| 98 | } | 98 | } |
| 99 | .swipeActions(edge: .trailing) { | 99 | .swipeActions(edge: .leading) { |
| 100 | Button(role: .destructive) { | 100 | Button(role: .destructive) { |
| 101 | print("\(task.taskItem) is being deleted.") | 101 | print("\(task.taskItem) is being deleted.") |
| 102 | } label: { | 102 | } label: { |
| 103 | Label("Delete", systemImage: "trash") | 103 | Label("Delete", systemImage: "trash") |
| 104 | } | 104 | } |
| 105 | } | ||
| 106 | .swipeActions(edge: .trailing) { | ||
| 107 | Button() { | ||
| 108 | print("\(task.taskItem) is being marked as complete.") | ||
| 109 | // TODO: Add method to complete message in the DataStore & move to Archive list | ||
| 110 | } label: { | ||
| 111 | Label("Complete", systemImage: "checkmark") | ||
| 112 | } | ||
| 113 | .tint(.green) | ||
| 105 | Button() { | 114 | Button() { |
| 106 | print("\(task.taskItem) is being edited.") | 115 | print("\(task.taskItem) is being edited.") |
| 107 | // TODO: Add method to edit message in the DataStore | 116 | // TODO: Add method to edit message in the DataStore |