hauselin/obsidian-alfred

Searching for a note opening it then quickly moving to another application then opens obsidian again

waynehoover opened this issue · 1 comments

This is related to #23

When I search for a note open it, then quickly command tab away from Obsidian before the second notification, Obsidian opens up again losing my focus on the app I just switched too, this is pretty annoying. Anyway to make this double open of a note faster so this doesn't happen?

For now because I always leave Obsidian open anyways, I just commended these lines out in the "Open note in Obsidian" script:

// delay(3);  // temporary fix for Electron bug (open note twice)
// app.openLocation(uri);

If the delay is shorter than 3 seconds, it sometimes might not work and could break other things. But if commenting it out works for you, go ahead and do that. It won't break anything else. As you've highlighted, this hack is to fix the annoyances described in #23.