Instantly sync updated pages when ticking off a task in a directive

This commit is contained in:
Zef Hemel
2023-08-05 21:09:41 +02:00
parent 2b62b898ce
commit 4af7afa4aa
4 changed files with 30 additions and 8 deletions
+2
View File
@@ -9,6 +9,7 @@ import {
index,
markdown,
space,
sync,
} from "$sb/silverbullet-syscall/mod.ts";
import {
@@ -164,6 +165,7 @@ async function toggleTaskMarker(
taskMarkerNode.children![0].text = changeTo;
text = renderToText(referenceMdTree);
await space.writePage(page, text);
sync.scheduleFileSync(`${page}.md`);
}
}
}