()
| 747 | } |
| 748 | }; |
| 749 | const debouncedRefresh = () => { |
| 750 | if (debounceTimer) window.clearTimeout(debounceTimer); |
| 751 | debounceTimer = window.setTimeout(() => { |
| 752 | const leaves = plugin.app.workspace.getLeavesOfType("markdown"); |
| 753 | leaves.forEach((leaf) => { |
| 754 | scheduleInjection(leaf); |
| 755 | }); |
| 756 | observeCanvasLeaves(); |
| 757 | debouncedCanvasRefresh({ force: true }); |
| 758 | }, 100); |
| 759 | }; |
| 760 | |
| 761 | // Inject widget when layout changes (file opened, switched, etc.) |
| 762 | const layoutChangeRef = plugin.app.workspace.on("layout-change", debouncedRefresh); |
nothing calls this directly
no test coverage detected