feat: edit a transcript in the Notitie editor, delete button per transcript

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-02 11:19:24 +02:00
co-authored by Claude Sonnet 5.5
parent 951e23ba22
commit b225718fb1
7 changed files with 101 additions and 10 deletions
+8
View File
@@ -108,6 +108,14 @@ public final class HistoryStore {
changed()
}
/// Replaces the final text of an entry. The highlighted corrections no longer match an edited text, so they are dropped.
public func updateText(id: UUID, to text: String) {
guard let index = entries.firstIndex(where: { $0.id == id }), entries[index].finalText != text else { return }
entries[index].finalText = text
entries[index].corrections = []
changed()
}
public func removeAll() {
entries = []
changed()
+9
View File
@@ -78,6 +78,15 @@ public final class HistoryViewModel: ObservableObject {
store.remove(id: id)
refresh()
}
public func entry(id: UUID) -> HistoryEntry? {
store.entries.first { $0.id == id }
}
public func updateText(id: UUID, to text: String) {
store.updateText(id: id, to: text)
refresh()
}
}
/// Dictionary rows with warnings, search, editing and undo.