txtodo

[DORMANT] a minimalist todo list app inspired by jeff huang
git clone git://git.figbert.com/txtodo.git
Log | Files | Refs | README

commit 39fc4ce0837b13c2b7bb34f2307063eb348cdd2d
parent dcf521a96ff070ea5b26180f7c69dfe4da2b0be3
Author: FIGBERT <figbert@figbert.com>
Date:   Thu, 17 Sep 2020 09:13:41 -0700

Update deprecated TextView syntax

Diffstat:
MShared/AddNoteView.swift | 4++--
MShared/AddTask.swift | 4++--
MShared/NoteView.swift | 4++--
MiOS/TaskView.swift | 4++--
4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/Shared/AddNoteView.swift b/Shared/AddNoteView.swift @@ -47,9 +47,9 @@ struct AddNoteView: View { #endif } Spacer() - TextField("tap", text: $config.newNoteText) { + TextField("tap", text: $config.newNoteText, onCommit: { addTask() - } + }) .multilineTextAlignment(.center) Spacer() Image(systemName: "plus.square") diff --git a/Shared/AddTask.swift b/Shared/AddTask.swift @@ -75,9 +75,9 @@ struct AddTaskView: View { #endif } Spacer() - TextField("tap", text: $config.newTaskText) { + TextField("tap", text: $config.newTaskText, onCommit: { addTask() - } + }) .multilineTextAlignment(.center) Picker( selection: $config.newTaskPriority, diff --git a/Shared/NoteView.swift b/Shared/NoteView.swift @@ -29,7 +29,7 @@ struct NoteView: View { self.config.editing = true } } else { - TextField("edit note", text: noteIntermediary) { + TextField("edit note", text: noteIntermediary, onCommit: { if let index = self.task.notes.firstIndex(of: self.note) { self.managedObjectContext.performAndWait { self.task.notes[index] = self.config.editingCache @@ -37,7 +37,7 @@ struct NoteView: View { } } self.config.editing = false - } + }) } Spacer() if config.showingDelete { diff --git a/iOS/TaskView.swift b/iOS/TaskView.swift @@ -66,12 +66,12 @@ struct TaskView: View { self.config.showingNotes = true } } else { - TextField("edit task", text: $task.name) { + TextField("edit task", text: $task.name, onCommit: { self.config.editingText = false self.managedObjectContext.performAndWait { try? self.managedObjectContext.save() } - } + }) } Spacer() if !config.editingPriority {