Skip to content

Commit 1504ede

Browse files
fix(tasks): use uuid instead of id for dialog open condition (#272)
Taskwarrior assigns id=0 to all completed and deleted tasks since they are removed from the active task list. Using task.id for the dialog's open condition caused multiple dialogs to open simultaneously when clicking on any non-pending task, resulting in flickering and blackout. Replaced _selectedTask?.id === task.id with _selectedTask?.uuid === task.uuid since uuid is unique for every task regardless of status. Fixes: #271
1 parent 0ffd79e commit 1504ede

File tree

1 file changed

+1
-1
lines changed
  • frontend/src/components/HomeComponents/Tasks

1 file changed

+1
-1
lines changed

frontend/src/components/HomeComponents/Tasks/Tasks.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -998,7 +998,7 @@ export const Tasks = (
998998
selectedIndex={selectedIndex}
999999
task={task}
10001000
isOpen={
1001-
_isDialogOpen && _selectedTask?.id === task.id
1001+
_isDialogOpen && _selectedTask?.uuid === task.uuid
10021002
}
10031003
onOpenChange={handleDialogOpenChange}
10041004
editState={editState}

0 commit comments

Comments
 (0)