Revert "Bugfix for #131"

This reverts commit 238c027903.
This commit is contained in:
SebastianMC 2024-02-09 14:03:48 +01:00
parent e18122c67d
commit 9f4008c2a2
3 changed files with 4 additions and 4 deletions

View File

@ -1,5 +1,4 @@
import { import {
FileExplorerView,
FrontMatterCache, FrontMatterCache,
MetadataCache, MetadataCache,
Plugin, Plugin,
@ -685,7 +684,8 @@ export const determineBookmarksOrderIfNeeded = (folderItems: Array<FolderItemFor
}) })
} }
export const folderSort = function (sortingSpec: CustomSortSpec, ctx: ProcessingContext, fileExplorer: FileExplorerView) { export const folderSort = function (sortingSpec: CustomSortSpec, ctx: ProcessingContext) {
let fileExplorer = this.fileExplorer
// shallow copy of groups and expand folder-specific macros on them // shallow copy of groups and expand folder-specific macros on them
sortingSpec.groupsShadow = sortingSpec.groups?.map((group) => Object.assign({} as CustomSortGroup, group)) sortingSpec.groupsShadow = sortingSpec.groups?.map((group) => Object.assign({} as CustomSortGroup, group))

View File

@ -622,7 +622,7 @@ export default class CustomSortPlugin extends Plugin {
} }
if (sortSpec) { if (sortSpec) {
return folderSort.call(this, sortSpec, plugin.createProcessingContextForSorting(has), patchableFileExplorer); return folderSort.call(this, sortSpec, plugin.createProcessingContextForSorting(has));
} else { } else {
return old.call(this, ...args); return old.call(this, ...args);
} }

View File

@ -51,7 +51,7 @@ declare module 'obsidian' {
export interface FileExplorerView extends View { export interface FileExplorerView extends View {
createFolderDom(folder: TFolder): FileExplorerFolder; createFolderDom(folder: TFolder): FileExplorerFolder;
fileItems: any;
requestSort(): void; requestSort(): void;
sortOrder: string sortOrder: string