reloading notes after script changes

This commit is contained in:
zadam
2019-10-20 12:29:34 +02:00
parent 78f5b7b288
commit 2305ad7405
21 changed files with 115 additions and 82 deletions

View File

@@ -1581,7 +1581,7 @@
<h4 class="name" id="getActiveNote"><span class="type-signature"></span>getActiveNote<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="NoteFull.html">NoteFull</a>}</span></h4>
<h4 class="name" id="getActiveTabNote"><span class="type-signature"></span>getActiveTabNote<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="NoteFull.html">NoteFull</a>}</span></h4>
@@ -1687,7 +1687,7 @@
<h4 class="name" id="getActiveNotePath"><span class="type-signature"></span>getActiveNotePath<span class="signature">()</span><span class="type-signature"> &rarr; {Promise.&lt;(string|null)>}</span></h4>
<h4 class="name" id="getActiveTabNotePath"><span class="type-signature"></span>getActiveTabNotePath<span class="signature">()</span><span class="type-signature"> &rarr; {Promise.&lt;(string|null)>}</span></h4>

View File

@@ -236,7 +236,7 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, tabConte
* @param {string} noteId
* @method
*/
this.reloadChildren = async noteId => await treeCache.reloadChildren(noteId);
this.reloadChildren = async noteId => await treeCache.reloadNotesAndTheirChildren(noteId);
/**
* @param {string} noteId
@@ -303,13 +303,13 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, tabConte
* @method
* @returns {NoteFull} active note (loaded into right pane)
*/
this.getActiveNote = noteDetailService.getActiveNote;
this.getActiveTabNote = noteDetailService.getActiveTabNote;
/**
* @method
* @returns {Promise&lt;string|null>} returns note path of active note or null if there isn't active note
*/
this.getActiveNotePath = () => {
this.getActiveTabNotePath = () => {
const activeTabContext = noteDetailService.getActiveTabContext();
return activeTabContext ? activeTabContext.notePath : null;