Templater icon indicating copy to clipboard operation
Templater copied to clipboard

Pause sync while replacing templates in a note

Open mdelobelle opened this issue 3 years ago • 2 comments

Is your feature request related to a problem? Please describe. Having obsidian opened on 2 devices, when I create a note with a template prompting for inputs or suggester, the prompts are shown on the two devices. This is because I have "Trigger Templater on new file creation" selected: therefore my new note being created with a template on device A is also synced on device B before I can complete all the inputs on device A; each device triggers templater at the same time and the second inputs that I complete on device B overrides the inputs that I've completed on device A.

Describe the solution you'd like Put an option in setting tab to "pause" the sync while replacing the template in a note and put it on "resume" when templater has completed the template replacement. Manage the case when an error occurs while replacing the template to avoid the sync staying in "pause"

Describe alternatives you've considered Close Obsidian on device B when triggering Templater ;) sure not the best UX

Additional context Thank you so much for your plugin, this is core in my automation process

mdelobelle avatar Feb 08 '22 07:02 mdelobelle

There isn't a way for a plugin to control syncing as far as I know.

shabegom avatar Feb 10 '22 14:02 shabegom

I've experienced something similar. In fact, even with Obsidian closed on desktop, the suggester isn't showing up on mobile. This issue seems to have started sometime in the past couple months, because at one point it was all running smoothly on mobile. What's really strange is that when I have both open, I can see the suggester pop up on my desktop even though I initiated the template from my mobile device. If Obsidian isn't running on desktop, then I get nothing: the Templater script stops and I have a blank screen — it's like it sent the request to Desktop and is awaiting a response there, but since it's not open, I have to force quit the app to get out of it.

@mdelobelle, wondering if you experienced anything similar?

Or maybe I should open a separate issue specifically for suggester not working on mobile?

frankreporting avatar Feb 20 '22 23:02 frankreporting