make sure to save the search note before refreshing the tree

This commit is contained in:
azivner 2019-01-09 19:54:32 +01:00
parent 77279dfe16
commit 99e56a9c42

View file

@ -1,5 +1,6 @@
import noteDetailService from "./note_detail.js";
import treeService from "./tree.js";
import infoService from './info.js';
const $searchString = $("#search-string");
const $component = $('#note-detail-search');
@ -27,7 +28,13 @@ function show() {
$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 {
getContent,