← All repositories

listless

A simple list app for Apple platforms

git clone https://code.inqk.net/listless.git


commit 12d38adc0751fd00e0e6ee921667b448325d57cd
parent 404fc4662ced07aa5ab2136c11f2a9197b426eac
Author: Michael Camilleri <[email protected]>
Date:   Thu,  5 Mar 2026 09:12:33 +0900

Clear selection when editing finished

On iPhone and iPad, having a visible selection state that persists after
editing could be confusing. This commit causes the selection to be
cleared after editing has finished.

Co-Authored-By: Claude 4.6 Opus <[email protected]>

Diffstat

MListlessiOS/Views/TaskListView.swift | 5++++-

1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/ListlessiOS/Views/TaskListView.swift b/ListlessiOS/Views/TaskListView.swift

@@ -330,7 +330,10 @@ struct TaskListView: View, TaskListViewProtocol {
                         onDelete: { deleteTaskWithUndo($0) },
                         onSelect: { selectTask($0) },
                         onStartEdit: { startEditing($0) },
-                        onEndEdit: { endEditing($0, shouldCreateNewTask: $1) }
+                        onEndEdit: {
+                            selectedTaskID = nil
+                            endEditing($0, shouldCreateNewTask: $1)
+                        }
                     )
                     .scaleEffect(draggedTaskID == taskID ? 1.05 : 1.0)
                     .shadow(