Skip to content

Commit a5b1173

Browse files
committed
🎨 #14813
1 parent b72d39e commit a5b1173

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

app/src/layout/dock/Files.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff 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) {

0 commit comments

Comments
 (0)