(path: string)
| 447 | } |
| 448 | |
| 449 | private isCompletedPath(path: string): boolean { |
| 450 | const cached = this.completedStatusByPath.get(path); |
| 451 | if (cached !== undefined) { |
| 452 | return cached; |
| 453 | } |
| 454 | |
| 455 | const file = this.app.vault.getAbstractFileByPath(path); |
| 456 | if (!(file instanceof TFile)) { |
| 457 | this.completedStatusByPath.set(path, false); |
| 458 | return false; |
| 459 | } |
| 460 | |
| 461 | const frontmatter = this.getFrontmatterForFile(file); |
| 462 | const completed = frontmatter ? this.isCompletedFrontmatter(frontmatter) : false; |
| 463 | this.completedStatusByPath.set(path, completed); |
| 464 | return completed; |
| 465 | } |
| 466 | |
| 467 | private isCompletedFrontmatter(frontmatter: Record<string, unknown>): boolean { |
| 468 | const statusField = this.fieldMapper?.toUserField("status") || "status"; |
no test coverage detected