From 735276fe213f9d640c226dbd8cf9730bc7e620bb Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Mon, 22 Jun 2026 09:29:56 +0300 Subject: Fix task operation cancellation for lq0 --- internal/ui/keyactions.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'internal/ui/keyactions.go') 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 } -- cgit v1.2.3