* Build indexes synchronously (for lazy initialization)
()
| 690 | * Build indexes synchronously (for lazy initialization) |
| 691 | */ |
| 692 | private buildIndexesSync(): void { |
| 693 | if (this.indexesBuilt) return; |
| 694 | |
| 695 | const files = this.app.vault.getMarkdownFiles(); |
| 696 | |
| 697 | for (const file of files) { |
| 698 | if (!this.isValidFile(file.path)) { |
| 699 | continue; |
| 700 | } |
| 701 | |
| 702 | const metadata = this.app.metadataCache.getFileCache(file); |
| 703 | if (!metadata?.frontmatter || !this.isTaskFileCallback(metadata.frontmatter)) { |
| 704 | continue; |
| 705 | } |
| 706 | |
| 707 | this.indexTaskFile(file.path, metadata.frontmatter); |
| 708 | } |
| 709 | |
| 710 | this.indexesBuilt = true; |
| 711 | this.trigger(EVENT_DEPENDENCY_CACHE_CHANGED); |
| 712 | } |
| 713 | |
| 714 | updateConfig(settings: TaskNotesSettings): void { |
| 715 | this.settings = settings; |
no test coverage detected