Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix no file / folder hidden when obsidian open #13

Closed
wants to merge 5 commits into from
Closed

fix no file / folder hidden when obsidian open #13

wants to merge 5 commits into from

Conversation

Mara-Li
Copy link

@Mara-Li Mara-Li commented Jun 8, 2022

See #12

I added a little sleep onLayoutReady because, when Obsidian open, it return null with querySelector.
Waiting a little the DOM loading resolve this. I use a 50 ms, but 0 or 1 ms work too. As I was afraid of breaking Obsidian, I prefer to use 50 ms.

I also removed the unnecessary semicolon.

Mara-Li added 2 commits June 8, 2022 11:34
Adding a little sleep (50ms) to wait for the dom after opening obsidian
@Oliver-Akins Oliver-Akins self-requested a review June 8, 2022 18:25
@Oliver-Akins Oliver-Akins added the on hold Something needs to happen before this can be continued label Jun 8, 2022
Copy link
Owner

@Oliver-Akins Oliver-Akins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this didn't exist when this pull request was initially made, so I understand why you did it the way you did, but I've added a style guide / contributing guidelines for the repo, if you can make the PR conform to the style guide I've set out, that would be greatly appreciated.

I didn't comment on each removed semicolon because that's excessive, but generally the functionality of the PR is good so it's just the style stuff that needs to be updated.

src/utils.ts Outdated Show resolved Hide resolved
src/main.ts Show resolved Hide resolved
src/main.ts Outdated Show resolved Hide resolved
src/main.ts Show resolved Hide resolved
@Oliver-Akins Oliver-Akins linked an issue Jun 10, 2022 that may be closed by this pull request
1 task
@Mara-Li
Copy link
Author

Mara-Li commented Jun 13, 2022

As I use eslint, maybe create an eslint configuration specific for the repo ?

@Oliver-Akins
Copy link
Owner

Ah, that'd be why, because I don't run eslint, I'll look into possibly adding an eslint config. For now only errors/warnings by the Typescript compiler or that happen directly in the Obsidian dev console are my main concerns.

@Mara-Li
Copy link
Author

Mara-Li commented Jun 25, 2022

Hi. I notice this fix doesn't work on mobile. Don't know why :/

@Mara-Li Mara-Li closed this Jun 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
on hold Something needs to happen before this can be continued
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Files and folders are not hidden until I recharge the plugin manually
2 participants