0
0
Fork 0

Fixed files not hiding on obsidian initial load

This commit is contained in:
Nathan George 2023-02-08 01:45:36 -05:00
parent 63b244d5b8
commit ff8b8a9a7d

View file

@ -63,10 +63,14 @@ export default class FileHider extends Plugin {
}) })
); );
this.app.workspace.onLayoutReady(() => { this.app.workspace.onLayoutReady(() =>
{
// Timeout is used to delay until the file explorer is loaded. Delay of 0 works, but I set it to 200 just to be safe.
setTimeout(() => {
for (const path of this.settings.hiddenList) { for (const path of this.settings.hiddenList) {
changePathVisibility(path, this.settings.hidden); changePathVisibility(path, this.settings.hidden);
}; };
}, 200);
}); });
new VisibilityToggleCommand(this); new VisibilityToggleCommand(this);