mirror of
https://github.com/antokeinanen/obsidian-advanced-merger.git
synced 2026-07-22 07:40:24 +00:00
fix: sort modes map incorrecly to settings
This commit is contained in:
parent
5a6a367806
commit
48419af41e
1 changed files with 5 additions and 5 deletions
10
main.ts
10
main.ts
|
|
@ -361,6 +361,11 @@ export default class AdvancedMerge extends Plugin {
|
|||
private sortNotes(files: Array<TFile>): Array<TFile> {
|
||||
switch (this.settings.sortMode) {
|
||||
case "alphabetical":
|
||||
return files.sort((a, b) => a.name.localeCompare(b.name));
|
||||
case "creationDate":
|
||||
return files.sort((a, b) => a.stat.ctime - b.stat.ctime);
|
||||
case "logical":
|
||||
default:
|
||||
return files.sort((a, b) =>
|
||||
a.path.localeCompare(b.path, undefined, {
|
||||
numeric: true,
|
||||
|
|
@ -368,11 +373,6 @@ export default class AdvancedMerge extends Plugin {
|
|||
usage: "sort",
|
||||
}),
|
||||
);
|
||||
case "creationDate":
|
||||
return files.sort((a, b) => a.stat.ctime - b.stat.ctime);
|
||||
case "logical":
|
||||
default:
|
||||
return files.reverse();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue