phibr0 / obsidian-advanced-toolbar

Advanced Toolbar - Obsidian Plugin | Enhances Obsidian Mobile's Quick Action Toolbar
GNU Affero General Public License v3.0
91 stars 3 forks source link

If not on mobile, quit with informative log msg #12

Closed DamnedScholar closed 2 years ago

DamnedScholar commented 2 years ago

The current onload() tries to make use of this.app.mobileToolbar without checking that it actually exists, which leads to an error in the console that's confusing unless you know what it is (I sorted through every plugin to find what was causing it). This change allows the platform check that's already in place to stop the rest of the plugin from trying to happen, and also makes the load and unload messages reflect the identity of the plugin.

phibr0 commented 2 years ago

Oops, I had fixed this a long time ago but didn't push the changes to GitHub. I will merge this and create a new Release