fix: window session reset, model-row locking, startup order, hotkey release, counter, history gate, dictionary editor and search polish

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-01 16:04:37 +02:00
co-authored by Claude Sonnet 5.5
parent 31c34a1d4a
commit ab7359156b
6 changed files with 52 additions and 11 deletions
+8
View File
@@ -95,6 +95,7 @@ struct DictionaryView: View {
selection = nil
}
}
.onChange(of: model.searchFocusTick) { _, _ in searchFocused = true }
.onChange(of: list.rows) { _, rows in
if let s = selection, !rows.contains(where: { $0.id == s }) { selection = nil }
}
@@ -215,7 +216,9 @@ private struct EntryEditor: View {
HStack(spacing: Space.s3) {
Spacer()
Button(Strings.cancel, action: onClose).buttonStyle(KeyButtonStyle())
.keyboardShortcut(.cancelAction)
Button(Strings.save, action: save).buttonStyle(KeyButtonStyle(kind: .record)).disabled(!canSave)
.keyboardShortcut(.defaultAction)
}
}
.padding(Layout.panelPadding)
@@ -246,6 +249,11 @@ private struct EntryEditor: View {
private func save() {
if let id = editingID {
guard list.rows.contains(where: { $0.id == id }) else {
list.errorMessage = Strings.entryGone
onClose()
return
}
list.update(id: id, to: kind)
} else {
list.add(kind)