mirror of
https://github.com/groldsf/obsidian_check_plugin.git
synced 2026-07-22 12:00:31 +00:00
fix sync unloadFile in previewMode
This commit is contained in:
parent
b9a9d7b73c
commit
13ab4da8e7
2 changed files with 2 additions and 1 deletions
|
|
@ -94,7 +94,7 @@ export default class SyncController {
|
|||
return;
|
||||
}
|
||||
await this.mutex.runExclusive(async () => {
|
||||
console.log(`sync file ${Date.now()}`)
|
||||
console.log(`sync file ${file.basename} date: ${Date.now()}`)
|
||||
let text = await this.plugin.app.vault.read(file);
|
||||
let textBefore = this.plugin.fileStateHolder.get(file);
|
||||
let newText = text;
|
||||
|
|
|
|||
|
|
@ -93,6 +93,7 @@ export default class CheckboxSyncPlugin extends Plugin {
|
|||
if (view.getMode() === 'preview') {
|
||||
console.log(`rerender ${view.file.basename}`);
|
||||
view.previewMode.rerender();
|
||||
await this.fileStateHolder.updateIfNeeded(view.file);
|
||||
} else {
|
||||
const content = view.editor.getValue();
|
||||
const tempEl = document.createElement('div');
|
||||
|
|
|
|||
Loading…
Reference in a new issue