MCPcopy
hub / github.com/callumalpass/tasknotes / removeFilterIndexEntry

Method removeFilterIndexEntry

src/utils/TaskManager.ts:593–613  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

591 }
592
593 private removeFilterIndexEntry(path: string): boolean {
594 if (!this.filterIndexesBuilt) {
595 return false;
596 }
597
598 const entry = this.taskFilterEntries.get(path);
599 if (!entry) {
600 return false;
601 }
602
603 this.taskFilterEntries.delete(path);
604 this.indexedTaskPaths.delete(path);
605 this.removePathFromIndex(this.statusIndex, entry.status, path);
606 this.removePathFromIndex(this.priorityIndex, entry.priority, path);
607 this.removePathFromIndex(this.dueDateIndex, entry.dueDate, path);
608 this.removePathFromIndex(this.scheduledDateIndex, entry.scheduledDate, path);
609 this.decrementValues(this.tagCounts, entry.tags);
610 this.decrementValues(this.contextCounts, entry.contexts);
611 this.decrementValues(this.projectCounts, entry.projects);
612 return true;
613 }
614
615 private addPathToIndex(
616 index: Map<string, Set<string>>,

Callers 6

handleFileDeletedMethod · 0.95
handleFileRenamedMethod · 0.95
clearCacheEntryMethod · 0.95
updateTaskInfoInCacheMethod · 0.95

Calls 4

removePathFromIndexMethod · 0.95
decrementValuesMethod · 0.95
getMethod · 0.65
deleteMethod · 0.65

Tested by

no test coverage detected