0
0
Fork 0

Merge pull request #27 from KosmosisDire/main

Fixed files not hiding on obsidian initial load
This commit is contained in:
Oliver 2023-02-08 16:02:39 -06:00 committed by GitHub
commit 53f6e6c96e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -63,10 +63,14 @@ export default class FileHider extends Plugin {
}) })
); );
this.app.workspace.onLayoutReady(() => { this.app.workspace.onLayoutReady(() =>
for (const path of this.settings.hiddenList) { {
changePathVisibility(path, this.settings.hidden); // 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); new VisibilityToggleCommand(this);