Open jmuchovej opened 1 year ago
I've been using this version for the last few days, on launch, Logseq often claims the plugin is "slowing Logseq start-up". I'm guessing it's probably because it downloads the BibTeX from a URL.
Do you know if there's a way to delay that until Logseq has loaded? (Put another way – do you know if Logseq has some kind of "event listener"-like system? E.g., if Logseq emits a "logseq-loaded" message, then whenever the path is a URL, we can begin the refresh process, so we don't slow down loading Logseq.)
I believe that you can use the logseq.on() function for this purpose as a listener for the logseq loaded message.
Hmm... I don't see any mention of logseq.on()
on @logseq/libs
. Do you mean logseq.ready()
?
I also think I sorted out the "slowing Logseq start-up", I forgot to run pnpm dev
on the local version I've been testing! 😅 So far, the main oddity has been the occasional hiccup with loading the DB from the URL, but that triggers a redownload anyways, so it shows up on the next usage.
URLs must be prefixed with a protocol to pass validation (and for
axios
to understand the URL). Upon triggering a "Reindex Citations DB" thisfetchDatabase
(formerlygetPaperPile
) will attempt to download BibTeX hosted at a given URL.Adds
validator
as a dependency (to validate URLs). Also clarifies new behavior in plugin settings. I used Markdown when writing the description, because these lines of theSettingSchemaDesc
seem to point todescription
supporting Markdown. However, there are a few Logseq plugins that confirm that this isn't necessarily true (perhaps in0.8.17
?), so if you think we should remove it, feel free! 🙂