file-explorer-note-count
file-explorer-note-count copied to clipboard
Add option to hide vault count
I'm interested in this too.
Got me interested in this too.
If anyone wants to do it themselves, here's the code you need to change in main.js
const setCount = (item, filter) => {
// if (item.file.isRoot()) return;
const count = countFolderChildren(item.file, filter);
item.selfEl.dataset['count'] = count.toString();
item.selfEl.toggleClass(withSubfolderClass, Array.isArray(item.file.children) &&
item.file.children.some((af) => af instanceof obsidian.TFolder));
};
to
const setCount = (item, filter) => {
if (item.file.isRoot()) return;
const count = countFolderChildren(item.file, filter);
item.selfEl.dataset['count'] = count.toString();
item.selfEl.toggleClass(withSubfolderClass, Array.isArray(item.file.children) &&
item.file.children.some((af) => af instanceof obsidian.TFolder));
};
Just uncomment the second line in setCount function
If anyone wants to do it themselves, here's the code you need to change in main.js
const setCount = (item, filter) => { // if (item.file.isRoot()) return; const count = countFolderChildren(item.file, filter); item.selfEl.dataset['count'] = count.toString(); item.selfEl.toggleClass(withSubfolderClass, Array.isArray(item.file.children) && item.file.children.some((af) => af instanceof obsidian.TFolder)); };
to
const setCount = (item, filter) => { if (item.file.isRoot()) return; const count = countFolderChildren(item.file, filter); item.selfEl.dataset['count'] = count.toString(); item.selfEl.toggleClass(withSubfolderClass, Array.isArray(item.file.children) && item.file.children.some((af) => af instanceof obsidian.TFolder)); };
Just uncomment the second line in setCount function
Thanks!