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 } ],