#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
This commit is contained in:
SebastianMC 2023-09-26 19:33:19 +02:00
parent d8874629ba
commit e866023bbf
2 changed files with 3 additions and 3 deletions

View File

@ -595,13 +595,14 @@ export const determineBookmarksOrderIfNeeded = (folderItems: Array<FolderItemFor
if (!plugin) return if (!plugin) return
folderItems.forEach((item) => { folderItems.forEach((item) => {
const folderDefaultSortRequiresBookmarksOrder: boolean = !!(sortingSpec.defaultOrder && sortOrderNeedsBookmarksOrder(sortingSpec.defaultOrder)) const folderDefaultSortRequiresBookmarksOrder: boolean = !!(sortingSpec.defaultOrder && sortOrderNeedsBookmarksOrder(sortingSpec.defaultOrder, sortingSpec.defaultSecondaryOrder))
let groupSortRequiresBookmarksOrder: boolean = false let groupSortRequiresBookmarksOrder: boolean = false
if (!folderDefaultSortRequiresBookmarksOrder) { if (!folderDefaultSortRequiresBookmarksOrder) {
const groupIdx: number | undefined = item.groupIdx const groupIdx: number | undefined = item.groupIdx
if (groupIdx !== undefined) { if (groupIdx !== undefined) {
const groupOrder: CustomSortOrder | undefined = sortingSpec.groups[groupIdx].order 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) { if (folderDefaultSortRequiresBookmarksOrder || groupSortRequiresBookmarksOrder) {

View File

@ -223,7 +223,6 @@ const expectedSortSpecsExampleA: { [key: string]: CustomSortSpec } = {
type: CustomSortGroupType.ExactName type: CustomSortGroupType.ExactName
}, },
{ {
order: CustomSortOrder.byBookmarkOrder,
type: CustomSortGroupType.Outsiders type: CustomSortGroupType.Outsiders
} }
], ],