fix: capture vault/path avant closeEditor() pour rafraichir l'affichage après save
This commit is contained in:
parent
c20a61f8ba
commit
1243782b6a
@ -424,10 +424,12 @@ async function saveFile() {
|
|||||||
saveBtn.innerHTML = '<i data-lucide="check" style="width:16px;height:16px"></i>';
|
saveBtn.innerHTML = '<i data-lucide="check" style="width:16px;height:16px"></i>';
|
||||||
safeCreateIcons();
|
safeCreateIcons();
|
||||||
|
|
||||||
|
const _savedVault = state.editorVault;
|
||||||
|
const _savedPath = state.editorPath;
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
closeEditor();
|
closeEditor();
|
||||||
if (state.currentVault === state.editorVault && state.currentPath === state.editorPath) {
|
if (state.currentVault === _savedVault && state.currentPath === _savedPath) {
|
||||||
openFile(state.currentVault, state.currentPath);
|
openFile(_savedVault, _savedPath);
|
||||||
}
|
}
|
||||||
}, 800);
|
}, 800);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user