mirror of
https://github.com/lostpaul/obsidian-folder-notes.git
synced 2026-07-22 07:40:24 +00:00
Hide collapse icon storage location difference
This commit is contained in:
parent
cfbee6a814
commit
404eeac1e8
1 changed files with 4 additions and 9 deletions
13
src/main.ts
13
src/main.ts
|
|
@ -90,12 +90,6 @@ export default class FolderNotesPlugin extends Plugin {
|
|||
this.tabManager?.updateTabs();
|
||||
}));
|
||||
|
||||
this.registerEvent(this.app.vault.on('delete', (file: TAbstractFile) => {
|
||||
if (!(file instanceof TFile)) { return; }
|
||||
const parentFolder = getFolder(this, file);
|
||||
removeCSSClassFromEL(parentFolder?.path, 'has-folder-note');
|
||||
}));
|
||||
|
||||
this.registerEvent(this.app.vault.on('create', (file: TAbstractFile) => {
|
||||
handleCreate(file, this);
|
||||
}));
|
||||
|
|
@ -175,12 +169,12 @@ export default class FolderNotesPlugin extends Plugin {
|
|||
} else if (this.settings.ignoreAttachmentFolder && this.app.vault.getAbstractFileByPath(`${folder.path}/${cleanAttachmentFolderPath}`)) {
|
||||
const folderPath = `${folder.path}/${cleanAttachmentFolderPath}`
|
||||
const attachmentFolder = this.app.vault.getAbstractFileByPath(folderPath);
|
||||
if (attachmentFolder instanceof TFolder) {
|
||||
if (!folder.collapsed) {
|
||||
if (attachmentFolder instanceof TFolder && folder.children.length <= threshold + 1) {
|
||||
if (!folder.collapsed ) {
|
||||
getEl(folder.path)?.click();
|
||||
}
|
||||
return folder.children.length <= threshold + 1;
|
||||
}
|
||||
return folder.children.length <= threshold + 1;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
|
@ -280,4 +274,5 @@ export default class FolderNotesPlugin extends Plugin {
|
|||
loadFileClasses(true, this);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue