mirror of
https://github.com/lostpaul/obsidian-folder-notes.git
synced 2026-07-22 07:40:24 +00:00
fix: increase infinity scroll buffer to show hidden folder notes
When Hide Folder Note is enabled, Obsidian's virtual scroll buffer (rootMargin) becomes too small to pre-render items below the many hidden folder notes, causing items to disappear during scrolling. Increase infinityScroll.rootMargin to 1.5x viewport height to ensure items are pre-rendered even with many hidden items above them. Closes #274 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
3fce80d6fb
commit
9c1b4aeba2
1 changed files with 8 additions and 0 deletions
|
|
@ -30,6 +30,7 @@ import {
|
|||
refreshAllFolderStyles, setActiveFolder, removeActiveFolder,
|
||||
} from './functions/styleFunctions';
|
||||
import { getExcludedFolder } from './ExcludeFolders/functions/folderFunctions';
|
||||
import { getFileExplorer } from './functions/utils';
|
||||
import { FOLDER_OVERVIEW_VIEW, FolderOverviewView } from './obsidian-folder-overview/src/view';
|
||||
import { registerOverviewCommands } from './obsidian-folder-overview/src/Commands';
|
||||
import { updateOverviewView, updateViewDropdown } from './obsidian-folder-overview/src/main';
|
||||
|
|
@ -174,6 +175,13 @@ export default class FolderNotesPlugin extends Plugin {
|
|||
}
|
||||
|
||||
registerFileExplorerObserver(this);
|
||||
|
||||
const fileExplorer = getFileExplorer(this);
|
||||
if (fileExplorer) {
|
||||
// @ts-expect-error use internal API
|
||||
fileExplorer.view.tree.infinityScroll.rootMargin = 1.5;
|
||||
}
|
||||
|
||||
this.registerView(FOLDER_OVERVIEW_VIEW, (leaf: WorkspaceLeaf) => {
|
||||
return new FolderOverviewView(leaf, this);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue