File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed 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