mirror of
https://github.com/lostpaul/obsidian-folder-notes.git
synced 2026-07-22 07:40:24 +00:00
Merge branch 'main' into feat-use-file-explorer
This commit is contained in:
commit
7199679437
1 changed files with 4 additions and 3 deletions
|
|
@ -5,6 +5,7 @@ import { applyTemplate } from './template';
|
|||
import { Commands } from './commands';
|
||||
import DeleteConfirmationModal from './modals/deleteConfirmation';
|
||||
import { FileExplorerWorkspaceLeaf } from './globals';
|
||||
import { ExcludedFolder } from './settings';
|
||||
|
||||
export default class FolderNotesPlugin extends Plugin {
|
||||
observer: MutationObserver;
|
||||
|
|
@ -92,7 +93,7 @@ export default class FolderNotesPlugin extends Plugin {
|
|||
event.stopImmediatePropagation();
|
||||
|
||||
const folder = event.target.parentElement?.getAttribute('data-path');
|
||||
if(!folder) { return }
|
||||
if (!folder) { return }
|
||||
const excludedFolder = this.getExcludedFolderByPath(folder);
|
||||
if (excludedFolder?.disableFolderNote) {
|
||||
event.target.onclick = null;
|
||||
|
|
@ -255,8 +256,8 @@ export default class FolderNotesPlugin extends Plugin {
|
|||
|
||||
getExcludedFolderByPath(path: string): ExcludedFolder | undefined {
|
||||
return this.settings.excludeFolders.find((excludedFolder) => {
|
||||
if(excludedFolder.path === path) { return true }
|
||||
if(!excludedFolder.subFolders) { return false }
|
||||
if (excludedFolder.path === path) { return true }
|
||||
if (!excludedFolder.subFolders) { return false }
|
||||
return this.getPathFromString(path).startsWith(excludedFolder.path)
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue