Add things

This commit is contained in:
Martin Pander
2026-02-04 13:13:04 +01:00
parent 474bb3dc07
commit 02fa2e503a
15 changed files with 1214 additions and 126 deletions

View File

@ -466,9 +466,15 @@ func NewTaskEdit(com *common.Common, task *taskwarrior.Task, isNew bool) *taskEd
}
opts := []picker.PickerOption{picker.WithOnCreate(onCreate)}
if isNew {
// Check if task has a pre-filled project (e.g., from ProjectTaskPickerPage)
hasPrefilledProject := task.Project != "" && task.Project != "(none)"
if isNew && !hasPrefilledProject {
// New task with no project → start in filter mode for quick project search
opts = append(opts, picker.WithFilterByDefault(true))
} else {
// Either existing task OR new task with pre-filled project → show list with project selected
opts = append(opts, picker.WithDefaultValue(task.Project))
}