uphy / obsidian-reminder

Reminder plugin for Obsidian
https://uphy.github.io/obsidian-reminder/
MIT License
452 stars 35 forks source link

[Feature]: Allow Obsidian Sync to sync the reminder states before reminding. #85

Open RobColes opened 2 years ago

RobColes commented 2 years ago

Goal or desired outcome of this feature

I use Obsidian on 2 work PCs, one home and one phone. Obsidian Sync is set up on all of them. I would like to be able to check off the reminder once and not have it recur on the other devices when they are first connected, before they have had a chance to sync the new reminder state.

Describe the feature

For my use case, detecting completion of an initial Obsidian sync before starting the overdue checking process would be ideal, but I appreciate not everyone uses Obsidian Sync.

Maybe a configurable delay before the initial check?

Screenshots, mockups, or videos

No response

uphy commented 2 years ago

I'm not sure because I'm not using Obsidian Sync, but I can implement the feature to delay the initial reminder check optionally by setting.

RobColes commented 2 years ago

That would be great, thank you. Happy to help beta test if that is useful.

crhallberg commented 2 years ago

I'm in the same boat here where I've had to disable Reminders for the time being since it keeps modifying files before they sync, creating conflicts.

crhallberg commented 2 years ago

I did some research on the Obsidian Discord and I found a post from a few months ago that outlines how to tap into the sync plugin (unofficially).

let syncPlugin = app.internalPlugins.plugins["sync"].instance;

//Sync plugin turned on or off
console.log(syncPlugin.plugin.enabled);

//Sync plugin paused or not
console.log(syncPlugin.pause);

//Sync plugin currently in the middle of syncing
console.log(syncPlugin.syncing);
console.log(syncPlugin.getStatus());

//Hook into "status-change" event for a callback when syncing has started or has completed. This event fires alot while syncing so need to put criteria around it
syncPlugin.on("status-change", () => {
    console.log("sync status is", syncPlugin.syncStatus);
});

//Sync plugin status; "Fully synced" means good to go.
console.log(syncPlugin.syncStatus);
ackatz commented 2 years ago

Would be interested in this feature as well.

Grant837 commented 1 year ago

Yes, I use obsidian on 4 devices, and its very annoying to have all the reminders pop up, that I just postponed for 3 hours, when I switch to my mobile device.

Grant837 commented 1 year ago

@uphy > I'm not sure because I'm not using Obsidian Sync, but I can implement the feature to delay the initial reminder check optionally by setting it.

Alas, it has no impact - when you set it to 300 on all devices (and relaunch) and later start Obsidian on another device, the reminders pop up immediately

Skroderider commented 1 year ago

Alas, it has no impact - when you set it to 300 on all devices (and relaunch) and later start Obsidian on another device, the reminders pop up immediately

I'm in the same boat as @Grant837. Is Reminders checking immediately after starting up? Am happy to get some logs for you if that will assist with troubleshooting.