I have seen in a number of scenarios it would be useful for a plugin to know if a sync is in process, so that it can wait to perform any actions until the sync is done. I don’t have a recommendation for an implementation, but probably something like registering to observe a start and complete sync events, along with perhaps a vault function for checking sync state (ex: app.vault.isSyncing(): boolean).
Additionally, as a sync user, I would like to have an option in settings to toggle on delayed loading of plugins until sync has finished. That way the newest data and any other plugins installed/updated on other devices have synced over. So if this “delayed plugin loading” was enabled:
- Obsidian starts
- Sync starts and finishes
- Then all enable plugins are loaded
Thanks for considering this request.