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>';
|
||||
safeCreateIcons();
|
||||
|
||||
const _savedVault = state.editorVault;
|
||||
const _savedPath = state.editorPath;
|
||||
setTimeout(() => {
|
||||
closeEditor();
|
||||
if (state.currentVault === state.editorVault && state.currentPath === state.editorPath) {
|
||||
openFile(state.currentVault, state.currentPath);
|
||||
if (state.currentVault === _savedVault && state.currentPath === _savedPath) {
|
||||
openFile(_savedVault, _savedPath);
|
||||
}
|
||||
}, 800);
|
||||
} catch (err) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user