diff --git a/src/functions/styleFunctions.ts b/src/functions/styleFunctions.ts index 4391c3e..dfb0d76 100644 --- a/src/functions/styleFunctions.ts +++ b/src/functions/styleFunctions.ts @@ -3,6 +3,7 @@ import FolderNotesPlugin from '../main'; import { getDetachedFolder, getExcludedFolder } from 'src/ExcludeFolders/functions/folderFunctions'; import { getFolder, getFolderNote } from 'src/functions/folderNoteFunctions'; import { getFileExplorer } from './utils'; +import FolderOverviewPlugin from 'src/obsidian-folder-overview/src/main'; export function loadFileClasses(forceReload = false, plugin: FolderNotesPlugin) { if (plugin.activeFileExplorer === getFileExplorer(plugin) && !forceReload) { return; } @@ -143,7 +144,7 @@ export function removeCSSClassFromEL(path: string | undefined, cssClass: string, fileExplorerItem.removeClass(cssClass); } -export function getEl(path: string, plugin: FolderNotesPlugin): HTMLElement | null { +export function getEl(path: string, plugin: FolderNotesPlugin | FolderOverviewPlugin): HTMLElement | null { const fileExplorer = getFileExplorer(plugin); if (!fileExplorer) { return null; } if (!fileExplorer.view) { return null; } diff --git a/src/functions/utils.ts b/src/functions/utils.ts index 4551add..2612275 100644 --- a/src/functions/utils.ts +++ b/src/functions/utils.ts @@ -1,6 +1,7 @@ import { FileExplorerWorkspaceLeaf } from 'src/globals'; import FolderNotesPlugin from 'src/main'; import { FileExplorerLeaf } from 'obsidian-typings'; +import FolderOverviewPlugin from 'src/obsidian-folder-overview/src/main'; export function getFileNameFromPathString(path: string): string { return path.substring(path.lastIndexOf('/') >= 0 ? path.lastIndexOf('/') + 1 : 0); @@ -36,7 +37,7 @@ export function getParentFolderPath(path: string): string { return this.getFolderPathFromString(this.getFolderPathFromString(path)); } -export function getFileExplorer(plugin: FolderNotesPlugin) { +export function getFileExplorer(plugin: FolderNotesPlugin | FolderOverviewPlugin) { return plugin.app.workspace.getLeavesOfType('file-explorer')[0] as any as FileExplorerWorkspaceLeaf; } diff --git a/src/settings/SettingsTab.ts b/src/settings/SettingsTab.ts index f79e330..f0749f2 100644 --- a/src/settings/SettingsTab.ts +++ b/src/settings/SettingsTab.ts @@ -116,6 +116,8 @@ export const DEFAULT_SETTINGS: FolderNotesSettings = { showFolderNotes: false, disableCollapseIcon: true, alwaysCollapse: false, + autoSync: true, + allowDragAndDrop: true }, useSubmenus: true, syncMove: true,