File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -673,11 +673,10 @@ export class Files extends Model {
673673 newElement . classList . remove ( "dragover" , "dragover__bottom" , "dragover__top" ) ;
674674 return ;
675675 }
676- const ulSort = newUlElement . getAttribute ( "data-sortmode" ) ;
677- if ( ( newElement . classList . contains ( "dragover__bottom" ) || newElement . classList . contains ( "dragover__top" ) ) &&
678- ( ulSort === "6" || ( window . siyuan . config . fileTree . sort === 6 && ulSort === "15" ) )
679- ) {
680- if ( selectRootElements . length > 0 && newElement . getAttribute ( "data-path" ) === "/" ) {
676+ if ( newElement . classList . contains ( "dragover__bottom" ) || newElement . classList . contains ( "dragover__top" ) ) {
677+ const ulSort = newUlElement . getAttribute ( "data-sortmode" ) ;
678+ if ( window . siyuan . config . fileTree . sort === 6 && selectRootElements . length > 0 &&
679+ newElement . getAttribute ( "data-path" ) === "/" ) {
681680 if ( newElement . classList . contains ( "dragover__top" ) ) {
682681 selectRootElements . forEach ( item => {
683682 newElement . parentElement . before ( item . parentElement ) ;
@@ -694,7 +693,7 @@ export class Files extends Model {
694693 fetchPost ( "/api/notebook/changeSortNotebook" , {
695694 notebooks,
696695 } ) ;
697- } else {
696+ } else if ( ( ulSort === "6" || ( window . siyuan . config . fileTree . sort === 6 && ulSort === "15" ) ) && selectFileElements . length > 0 ) {
698697 let hasMove = false ;
699698 const toDir = pathPosix ( ) . dirname ( toPath ) ;
700699 if ( fromPaths . length > 0 ) {
You can’t perform that action at this time.
0 commit comments