Compare commits

..

4 commits
1.8.26 ... main

Author SHA1 Message Date
Paul
494d159107
Merge pull request #333 from kyan001/patch-1
Bug Fix #330 & #332
2026-06-26 14:16:55 +02:00
Kyan
0532186cb2
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-06-26 11:52:15 +08:00
Kyan
f6a28dab67
Bug Fix #330 & #332
In the breadcrumb path processing loop, the function exits too early when it encounters a level without a folder note, so later levels are never checked. Because of this early return, clicking a deeper path segment does not open its folder note unless all ancestor folders also have folder notes.
2026-06-26 11:38:34 +08:00
Paul
85cd981d8d Update main.ts 2026-06-15 11:51:21 +02:00
2 changed files with 8 additions and 2 deletions

View file

@ -202,8 +202,12 @@ async function updateFolderNamesInPath(
viewHeaderTitle.classList.remove('path-is-folder-note');
}
}
if (!folderNote) return;
if (folderNote) breadcrumb.classList.add('has-folder-note');
if (!folderNote) {
breadcrumb.classList.remove('has-folder-note');
breadcrumb.removeAttribute('data-path');
continue;
}
breadcrumb.classList.add('has-folder-note');
breadcrumb?.setAttribute('data-path', path.slice(0, -TRAILING_SLASH_LENGTH));
if (!breadcrumb.onclick) {
breadcrumb.addEventListener('click', (e) => {

View file

@ -225,6 +225,8 @@ export default class FolderNotesPlugin extends Plugin {
const infinityScroll = fileExplorer?.view?.tree?.infinityScroll;
if (infinityScroll) {
// increase infinity scroll buffer to show hidden folder notes
// Issue: https://github.com/LostPaul/obsidian-folder-notes/issues/274
infinityScroll.rootMargin = 1.5;
}