Oliver-Akins / file-hider

A plugin for https://obsidian.md that allows hiding specific files and folders from the file explorer.
MIT License
60 stars 12 forks source link

Hidden files or folders become visible after app restart on iOS #32

Open victor-onofrei opened 1 year ago

victor-onofrei commented 1 year ago

Plugin Version

1.1.1

Obsidian Version

1.4.3 (95)

Affected Platforms

iOS

Expected Behaviour

Files or folders should stay hidden after application restart

Actual Behaviour

Files or folder become visible after application restart

Steps to Reproduce

  1. Hide a file/folder
  2. Restart the application

Workaround: Enable and disable “Hidden File Visibility”

t-schreibs commented 1 year ago

This is true on Android as well.

RedLilith commented 1 year ago

Happens on Windows as well

mtzfox commented 1 year ago

This is happening on my Mac as well. Also randomly is hiding my entire vault explorer, then I click unhide, restart Obsidian and everything comes back.

snattack commented 10 months ago

Still an issue on macOS, any ideas on when this can be fixed or what the problem is?

farline99 commented 8 months ago

android is in da house

janbaykara commented 6 months ago

I wonder if it's to do with the fact that settings are awaited, then the listener for the file menu is established. This looks like a potential race condition scenario:

https://github.com/Oliver-Akins/file-hider/blob/b9b3e89660fc35382554658b4032a279d5bfc21e/src/main.ts#L22-L25

I could submit a PR for an alternative approach but I'd like some assurance from @Oliver-Akins or another maintainer that they're still maintaining the repo?

Oliver-Akins commented 6 months ago

@janbaykara - Ohhh, interesting possibility. If you want to make a PR I'll review it, but I'll only validate changes on Linux, so any platform-specific stuff I cannot 100% validate. Though since it seems like this is applicable on most platforms the fix would hopefully be a similar situation.

I'll also probably release #30 at the same time, since that didn't feel like a large enough change to make a new release for.

janbaykara commented 6 months ago

Great, I'll put in a PR sometime soon!