(
draggedPath: string,
plan: SortOrderPlan,
plugin: TaskNotesPlugin,
options: { includeDragged?: boolean } = {}
)
| 697 | * Apply a previously prepared sort-order plan using the configured mapping. |
| 698 | */ |
| 699 | export async function applySortOrderPlan( |
| 700 | draggedPath: string, |
| 701 | plan: SortOrderPlan, |
| 702 | plugin: TaskNotesPlugin, |
| 703 | options: { includeDragged?: boolean } = {} |
| 704 | ): Promise<void> { |
| 705 | if (!plan.sortOrder) return; |
| 706 | |
| 707 | for (const write of plan.additionalWrites) { |
| 708 | await writeSortOrder(write.path, write.sortOrder, plugin); |
| 709 | } |
| 710 | |
| 711 | if (options.includeDragged !== false) { |
| 712 | await writeSortOrder(draggedPath, plan.sortOrder, plugin); |
| 713 | } |
| 714 | } |
| 715 | |
| 716 | /** |
| 717 | * Per-task promise queue that serializes async drop operations on the same file. |
no test coverage detected