Focus the task list whenever it opens, not only via ⌘T/⌘P
This commit is contained in:
@@ -317,8 +317,22 @@ private struct FollowCursor: ViewModifier {
|
||||
}
|
||||
}
|
||||
}
|
||||
#if os(macOS)
|
||||
.onChange(of: shownList, initial: true) {
|
||||
if shownList != nil, store.paneFocus.inTaskPane {
|
||||
overlays.takeListKeys(overlays.taskList ? store.selectedTaskId : nil)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
private var shownList: String? {
|
||||
guard listedTasks(store, overlays) != nil else {
|
||||
return nil
|
||||
}
|
||||
return overlays.taskList ? "" : store.focusedProject()?.id
|
||||
}
|
||||
}
|
||||
|
||||
struct TaskList: View {
|
||||
|
||||
Reference in New Issue
Block a user