mirror of
https://github.com/zadam/trilium.git
synced 2025-02-25 15:35:43 +08:00
make sure to save the search note before refreshing the tree
This commit is contained in:
parent
77279dfe16
commit
99e56a9c42
1 changed files with 8 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
||||||
import noteDetailService from "./note_detail.js";
|
import noteDetailService from "./note_detail.js";
|
||||||
import treeService from "./tree.js";
|
import treeService from "./tree.js";
|
||||||
|
import infoService from './info.js';
|
||||||
|
|
||||||
const $searchString = $("#search-string");
|
const $searchString = $("#search-string");
|
||||||
const $component = $('#note-detail-search');
|
const $component = $('#note-detail-search');
|
||||||
|
@ -27,7 +28,13 @@ function show() {
|
||||||
$searchString.on('input', noteDetailService.noteChanged);
|
$searchString.on('input', noteDetailService.noteChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
$refreshButton.click(() => treeService.reload());
|
$refreshButton.click(async () => {
|
||||||
|
await noteDetailService.saveNoteIfChanged();
|
||||||
|
|
||||||
|
treeService.reload();
|
||||||
|
|
||||||
|
infoService.showMessage('Tree has been refreshed.');
|
||||||
|
});
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
getContent,
|
getContent,
|
||||||
|
|
Loading…
Reference in a new issue