@@ -173,14 +173,6 @@ interface ExpandedSubtreeResponse {
173173 branchIds : string [ ] ;
174174}
175175
176- interface Node extends Fancytree . NodeData {
177- noteId : string ;
178- parentNoteId : string ;
179- branchId : string ;
180- isProtected : boolean ;
181- noteType : NoteType ;
182- }
183-
184176interface RefreshContext {
185177 noteIdsToUpdate : Set < string > ;
186178 noteIdsToReload : Set < string > ;
@@ -769,7 +761,7 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
769761 prepareChildren ( parentNote : FNote ) {
770762 utils . assertArguments ( parentNote ) ;
771763
772- const noteList : Node [ ] = [ ] ;
764+ const noteList : Fancytree . FancytreeNewNode [ ] = [ ] ;
773765
774766 const hideArchivedNotes = this . hideArchivedNotes ;
775767
@@ -837,7 +829,7 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
837829
838830 const isFolder = note . isFolder ( ) ;
839831
840- const node : Node = {
832+ const node : Fancytree . FancytreeNewNode = {
841833 noteId : note . noteId ,
842834 parentNoteId : branch . parentNoteId ,
843835 branchId : branch . branchId ,
@@ -849,7 +841,7 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
849841 refKey : note . noteId ,
850842 lazy : true ,
851843 folder : isFolder ,
852- expanded : branch . isExpanded && note . type !== "search" ,
844+ expanded : ! ! branch . isExpanded && note . type !== "search" ,
853845 key : utils . randomString ( 12 ) // this should prevent some "duplicate key" errors
854846 } ;
855847
@@ -911,7 +903,6 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
911903 return extraClasses . join ( " " ) ;
912904 }
913905
914- /** @returns {FancytreeNode[] } */
915906 getSelectedNodes ( stopOnParents = false ) {
916907 return this . tree . getSelectedNodes ( stopOnParents ) ;
917908 }
@@ -1532,7 +1523,7 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
15321523
15331524 // Automatically expand the hoisted note by default
15341525 const node = this . getActiveNode ( ) ;
1535- if ( node ? .data . noteId === this . noteContext . hoistedNoteId ) {
1526+ if ( node && node . data . noteId === this . noteContext . hoistedNoteId ) {
15361527 this . setExpanded ( node . data . branchId , true ) ;
15371528 }
15381529 }
0 commit comments