Skip to content

Commit

Permalink
Revert "Bugfix for #131"
Browse files Browse the repository at this point in the history
This reverts commit 238c027.
  • Loading branch information
SebastianMC committed Feb 9, 2024
1 parent e18122c commit 9f4008c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/custom-sort/custom-sort.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {
FileExplorerView,
FrontMatterCache,
MetadataCache,
Plugin,
Expand Down Expand Up @@ -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
sortingSpec.groupsShadow = sortingSpec.groups?.map((group) => Object.assign({} as CustomSortGroup, group))
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ export default class CustomSortPlugin extends Plugin {
}

if (sortSpec) {
return folderSort.call(this, sortSpec, plugin.createProcessingContextForSorting(has), patchableFileExplorer);
return folderSort.call(this, sortSpec, plugin.createProcessingContextForSorting(has));
} else {
return old.call(this, ...args);
}
Expand Down
2 changes: 1 addition & 1 deletion src/types/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ declare module 'obsidian' {

export interface FileExplorerView extends View {
createFolderDom(folder: TFolder): FileExplorerFolder;
fileItems: any;

requestSort(): void;

sortOrder: string
Expand Down

0 comments on commit 9f4008c

Please sign in to comment.