File tree Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -176,11 +176,6 @@ async function moveNodeUpInHierarchy(node: Fancytree.FancytreeNode) {
176176 toastService . showError ( resp . message ) ;
177177 return ;
178178 }
179-
180- if ( ! hoistedNoteService . isTopLevelNode ( node ) && node . getParent ( ) . getChildren ( ) . length <= 1 ) {
181- node . getParent ( ) . folder = false ;
182- node . getParent ( ) . renderTitle ( ) ;
183- }
184179}
185180
186181function filterSearchBranches ( branchIds : string [ ] ) {
Original file line number Diff line number Diff line change @@ -1606,27 +1606,29 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
16061606 return ! parentNote ?. hasLabel ( "sorted" ) ;
16071607 }
16081608
1609- moveNoteUpCommand ( { node } : CommandListenerData < "moveNoteUp" > ) {
1609+ async moveNoteUpCommand ( { node } : CommandListenerData < "moveNoteUp" > ) {
16101610 if ( ! node || ! this . canBeMovedUpOrDown ( node ) ) {
16111611 return ;
16121612 }
16131613
16141614 const beforeNode = node . getPrevSibling ( ) ;
16151615
16161616 if ( beforeNode !== null ) {
1617- branchService . moveBeforeBranch ( [ node . data . branchId ] , beforeNode . data . branchId ) ;
1617+ await branchService . moveBeforeBranch ( [ node . data . branchId ] , beforeNode . data . branchId ) ;
1618+ node . makeVisible ( { scrollIntoView : true } ) ;
16181619 }
16191620 }
16201621
1621- moveNoteDownCommand ( { node } : CommandListenerData < "moveNoteDown" > ) {
1622+ async moveNoteDownCommand ( { node } : CommandListenerData < "moveNoteDown" > ) {
16221623 if ( ! this . canBeMovedUpOrDown ( node ) ) {
16231624 return ;
16241625 }
16251626
16261627 const afterNode = node . getNextSibling ( ) ;
16271628
16281629 if ( afterNode !== null ) {
1629- branchService . moveAfterBranch ( [ node . data . branchId ] , afterNode . data . branchId ) ;
1630+ await branchService . moveAfterBranch ( [ node . data . branchId ] , afterNode . data . branchId ) ;
1631+ node . makeVisible ( { scrollIntoView : true } ) ;
16301632 }
16311633 }
16321634
You can’t perform that action at this time.
0 commit comments