fix(filters): properly filter tasks with tgProject in inbox view

- Update inbox filter to use hasProject() function which correctly
  checks both metadata.project and metadata.tgProject fields
- Ensure tasks with any project assignment are excluded from inbox
This commit is contained in:
Quorafind 2025-07-22 10:31:27 +08:00
parent 74e2d74c71
commit 58e53e8a91

View file

@ -11,6 +11,7 @@ import {
FilterGroup,
RootFilterState,
} from "../components/task-filter/ViewTaskFilter";
import { hasProject } from "./taskUtil";
// 从ViewTaskFilter.ts导入相关接口
@ -707,7 +708,7 @@ export function filterTasks(
// Only apply default logic if no rules were defined for this view
switch (viewId) {
case "inbox":
filtered = filtered.filter((task) => !task.metadata.project);
filtered = filtered.filter((task) => !hasProject(task));
break;
case "flagged":
filtered = filtered.filter(