I’m building an app which will schedule todos into your google calendar. I’ve got a global sync button that shows in all task views and on the settings page which you can use to sync the tasks with the calendar (for instance if you reschedule an event, it reschedules your todos).
I have made a global client-side module to handle the sync using the Google calendar api, since this sync function is used in many places.
How should I be creating subscriptions for syncing? For instance, to sync, I need to know which of the user’s calendars are “active”, and which tasks are still to do (i.e. not done or removed). So, should I put the subscription in the sync module? Or just sprinkle it around in every view that calls the sync function?