fix(trash & tags): fix subtasks hierarchy restoration in trash and real-time tag counts sync
Build and Push Docker Image / build-and-push (push) Successful in 9m16s

This commit is contained in:
2026-08-21 23:00:50 +09:00
parent 4d1da38085
commit fc70b1e8cb
4 changed files with 44 additions and 29 deletions
+3 -3
View File
@@ -410,13 +410,13 @@ export function AppShell({ user, isDemo = false }: AppShellProps) {
}
};
// Restore from Trash
// Restore from Trash (Restores task and all its nested subtasks)
const handleRestoreTask = (id: string) => {
if (isDemo) {
const store = getDemoStore();
const newTasks = restoreTaskInTree(store.tasks, id);
saveDemoStore(store.lists, newTasks);
setTasks((prev) => prev.filter((t) => t.id !== id));
setTasks(getAllTrashTasks(newTasks) as Task[]);
refresh();
}
};
@@ -427,7 +427,7 @@ export function AppShell({ user, isDemo = false }: AppShellProps) {
const store = getDemoStore();
const newTasks = deleteTaskInTree(store.tasks, id);
saveDemoStore(store.lists, newTasks);
setTasks((prev) => prev.filter((t) => t.id !== id));
setTasks(getAllTrashTasks(newTasks) as Task[]);
refresh();
}
};