From e866023bbf0c44e9927f07323160aea77b9998a4 Mon Sep 17 00:00:00 2001 From: SebastianMC <23032356+SebastianMC@users.noreply.github.com> Date: Tue, 26 Sep 2023 19:33:19 +0200 Subject: [PATCH] #74 - Integration with Bookmarks core plugin and support for indirect drag & drop arrangement - adjusted bookmarks integration to the merged from master multi-level sorting support and its implications --- src/custom-sort/custom-sort.ts | 5 +++-- src/custom-sort/sorting-spec-processor.spec.ts | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/custom-sort/custom-sort.ts b/src/custom-sort/custom-sort.ts index 9bea2be..7e08707 100644 --- a/src/custom-sort/custom-sort.ts +++ b/src/custom-sort/custom-sort.ts @@ -595,13 +595,14 @@ export const determineBookmarksOrderIfNeeded = (folderItems: Array { - const folderDefaultSortRequiresBookmarksOrder: boolean = !!(sortingSpec.defaultOrder && sortOrderNeedsBookmarksOrder(sortingSpec.defaultOrder)) + const folderDefaultSortRequiresBookmarksOrder: boolean = !!(sortingSpec.defaultOrder && sortOrderNeedsBookmarksOrder(sortingSpec.defaultOrder, sortingSpec.defaultSecondaryOrder)) let groupSortRequiresBookmarksOrder: boolean = false if (!folderDefaultSortRequiresBookmarksOrder) { const groupIdx: number | undefined = item.groupIdx if (groupIdx !== undefined) { const groupOrder: CustomSortOrder | undefined = sortingSpec.groups[groupIdx].order - groupSortRequiresBookmarksOrder = sortOrderNeedsBookmarksOrder(groupOrder) + const groupSecondaryOrder: CustomSortOrder | undefined = sortingSpec.groups[groupIdx].secondaryOrder + groupSortRequiresBookmarksOrder = sortOrderNeedsBookmarksOrder(groupOrder, groupSecondaryOrder) } } if (folderDefaultSortRequiresBookmarksOrder || groupSortRequiresBookmarksOrder) { diff --git a/src/custom-sort/sorting-spec-processor.spec.ts b/src/custom-sort/sorting-spec-processor.spec.ts index caa17fc..63ed0de 100644 --- a/src/custom-sort/sorting-spec-processor.spec.ts +++ b/src/custom-sort/sorting-spec-processor.spec.ts @@ -223,7 +223,6 @@ const expectedSortSpecsExampleA: { [key: string]: CustomSortSpec } = { type: CustomSortGroupType.ExactName }, { - order: CustomSortOrder.byBookmarkOrder, type: CustomSortGroupType.Outsiders } ],