Merge pull request #27 from KosmosisDire/main
Fixed files not hiding on obsidian initial load
This commit is contained in:
commit
53f6e6c96e
1 changed files with 8 additions and 4 deletions
12
src/main.ts
12
src/main.ts
|
|
@ -63,10 +63,14 @@ export default class FileHider extends Plugin {
|
|||
})
|
||||
);
|
||||
|
||||
this.app.workspace.onLayoutReady(() => {
|
||||
for (const path of this.settings.hiddenList) {
|
||||
changePathVisibility(path, this.settings.hidden);
|
||||
};
|
||||
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) {
|
||||
changePathVisibility(path, this.settings.hidden);
|
||||
};
|
||||
}, 200);
|
||||
});
|
||||
|
||||
new VisibilityToggleCommand(this);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue