fix: no-op unknown removal, earlier-duplicate editor check, list focus for delete/undo
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,7 @@ struct HistoryView: View {
|
||||
@EnvironmentObject private var model: AppModel
|
||||
@ObservedObject var list: HistoryViewModel
|
||||
@FocusState private var searchFocused: Bool
|
||||
@FocusState private var listFocused: Bool
|
||||
|
||||
var body: some View {
|
||||
VStack(spacing: Layout.panelGap) {
|
||||
@@ -47,6 +48,9 @@ struct HistoryView: View {
|
||||
}
|
||||
}
|
||||
.focusable()
|
||||
.focused($listFocused)
|
||||
.focusEffectDisabled()
|
||||
.onChange(of: list.selection) { _, _ in listFocused = true }
|
||||
.onDeleteCommand {
|
||||
if let id = list.selection { list.delete(id: id) }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user