diff options
| author | Paul Buetow <paul@buetow.org> | 2026-06-22 09:29:56 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-06-22 09:29:56 +0300 |
| commit | 735276fe213f9d640c226dbd8cf9730bc7e620bb (patch) | |
| tree | 330c26fb0527b6348f1a71e148e8e8b5863e297c /internal/ui/keyactions.go | |
| parent | 1888b70cf4981cabaef0b6e33e0ae9982d3a788e (diff) | |
Fix task operation cancellation for lq0
Diffstat (limited to 'internal/ui/keyactions.go')
| -rw-r--r-- | internal/ui/keyactions.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/internal/ui/keyactions.go b/internal/ui/keyactions.go index 072ea20..c84c172 100644 --- a/internal/ui/keyactions.go +++ b/internal/ui/keyactions.go @@ -159,7 +159,7 @@ func (m *Model) handleUndo() (tea.Model, tea.Cmd) { } filters = append(filters, "status:"+restore.status) - ctx, cancel := taskExportContext() + ctx, cancel := m.taskExportContext() tasks, err := task.Export(ctx, filters...) cancel() if err == nil && len(tasks) > 0 { @@ -200,7 +200,7 @@ func (m *Model) deleteTaskWithUndo(tsk task.Task) (int, bool, error) { recurring := isRecurringTask(tsk) tasks := []task.Task{tsk} if recurring { - ctx, cancel := taskExportContext() + ctx, cancel := m.taskExportContext() series, err := task.RecurringSeries(ctx, recurringRootUUID(tsk)) cancel() if err != nil { @@ -495,7 +495,9 @@ func (m *Model) handleTagToProject() (tea.Model, tea.Cmd) { } // Remove the tag from the task - if err := task.RemoveTags(id, []string{firstTag}); err != nil { + ctx, cancel := m.taskExportContext() + defer cancel() + if err := task.RemoveTagsContext(ctx, id, []string{firstTag}); err != nil { m.showError(err) return m, nil } |
