+ {renderPinnedFiles()}
+
+ {sortedFiles.map(renderFile)}
+
);
};
diff --git a/src/store.ts b/src/store.ts
index f569c1e..bc486c3 100644
--- a/src/store.ts
+++ b/src/store.ts
@@ -2,19 +2,14 @@ import { create } from "zustand";
import { TFile, TFolder } from "obsidian";
import FolderFileSplitterPlugin from "./main";
-import {
- addItem,
- isAbstractFileIncluded,
- isFile,
- isFolder,
- removeItem,
-} from "./utils";
+import { isAbstractFileIncluded, isFile, isFolder } from "./utils";
import {
FFS_EXPANDED_FOLDER_PATHS_KEY,
FFS_FILE_SORT_RULE_KEY,
FFS_FOCUSED_FILE_PATH_KEY,
FFS_FOCUSED_FOLDER_PATH_KEY,
FFS_FOLDER_SORT_RULE_KEY,
+ FFS_PINNED_FILE_PATHS_KEY,
FFS_PINNED_FOLDER_PATHS_KEY,
} from "./assets/constants";
@@ -39,6 +34,7 @@ export type FileTreeStore = {
focusedFolder: TFolder | null;
pinnedFolderPaths: string[];
focusedFile: TFile | null;
+ pinnedFilePaths: string[];
folderSortRule: FolderSortRule;
fileSortRule: FileSortRule;
expandedFolderPaths: string[];
@@ -89,6 +85,10 @@ export type FileTreeStore = {
changeFileSortRule: (rule: FileSortRule) => Promise