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

Plugin getting disabled when opening a vault on Mobile (synced with a desktop) #42

Open
damiankorcz opened this issue Mar 26, 2024 · 3 comments

Comments

@damiankorcz
Copy link

As the title states the plugin automatically gets disabled when viewing a vault which is opened on Mobile. In my case, I use Syncthing to sync my vault between a Desktop (Windows), Laptop (Windows), Phone (Android) and Tablet (Android).

I know that the plugin doesn't really make sense for mobile, but it would be nice to keep it enabled but have it detect when it's loaded in mobile Obsidian and simply not do anything and remain enabled.

With the current behaviour if I open my vault on mobile, then later open my desktop or laptop, the vault won't open on boot since the plugin is disabled and was synced in that state.

Thanks!

@dragonwocky
Copy link
Owner

dragonwocky commented Mar 26, 2024

Hm, that's interesting. That's not intended behaviour, for sure.

I specified the plugin to be desktop only in the manifest, so what happens on mobile is entirely up to Obsidian (https://docs.obsidian.md/Reference/TypeScript+API/PluginManifest/isDesktopOnly), it's not something I'm handling manually. I suppose I could remove that option and implement my own "run without doing anything" logic specifically for mobile, but I wonder if this is maybe a bug in Obsidian itself that should be checked with their team first?

@damiankorcz
Copy link
Author

Yeah I'm not sure. I just tried it again and the part that makes Obsidian launch at boot seems to stick but I don't get the tray icon and the plugin is disabled. I'm guessing if the plugin is set to Desktop only then the behaviour is to turn it off on mobile just in case it would have untested results. Might be worth asking Obsidian devs for clarification.

Thanks for looking into this. Such a small plugin but it's very useful and saves me from reopening Obsidian through out the day :)

@dragonwocky
Copy link
Owner

I'm a little overloaded right now, but when I'm able to I'll see if I can get to the bottom of this properly. Thanks for the pickup!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants