sfsam / Itsycal

Itsycal is a tiny calendar for your Mac's menu bar. http://www.mowglii.com/itsycal
MIT License
3.35k stars 234 forks source link

ItsyCal not picking up external events w/o restart app #97

Open nianwang opened 6 years ago

nianwang commented 6 years ago

There appears to be a lag in when ItsyCal gets calendar updates vs. new events added/modified/removed via the Calendar.app. When ItsyCal is restarted, then the event modifications are picked up.

For example:

  1. Ensure ItsyCal is running
  2. Add an event "Test Event" for later today to Calendar.app
  3. After 5 minutes, check ItsyCal

As a quick fix, perhaps there is a "refresh" button (e.g., 🔄) that can be exposed to force an update. Otherwise, is there a lag on updates that ItsyCal is not picking up?

sfsam commented 6 years ago

I can't reproduce this bug as you have described, but I have noticed related behavior.

When I add an event to the Mac Calendar.app, I see it pop up in Itsycal a moment later. However, if I add an event to the iPhone Calendar.app, I won't see it pop up in Itsycal. What I have to do is open the Mac Calendar.app (which also doesn't show the new event) and refresh it. The event then shows up in the Mac Calendar.app and then in Itsycal a moment later.

Itsycal doesn't poll for new events. Instead, it registers for a 'push' notification from the Mac's underlying calendar database. When the calendar database changes, it notifies Itsycal (as well as any other app that has registered for notification) that events have changed. Itsycal then pulls events from the calendar database and updates its own state.

I've tried adding a 'refresh button' to Itsycal, but if the underlying system calendar database hasn't changed, Itsycal won't change. And that seems to be the case here, at least in the scenario that I'm observing. It looks like the Mac calendar database isn't being updated until I refresh the Mac Calendar.app. I'm wondering if this is somehow an iCloud syncing issue.

I'd like to be able to reproduce the behavior you are describing where new Mac Calendar events aren't showing in Itsycal. Can you provide more details? For example, what kind of calendar are you updating? What version of macOS are you using? What happens if you refresh the Mac Calendar app after adding the event? Etc...

nianwang commented 6 years ago

Current macOS 10.13.4

The behavior you describe might be related. In this case, the underlying calendar is from G-Suite. However, I did do the following test:

  1. Add a future event to my iCloud-enabled "Home" calendar
  2. Refresh via "View > Refresh Calendar" menu
  3. Open up ItsyCal ... (no future event showing)
  4. Restart ItsyCal ... (future event shows!)

Also tested in the same fashion: creating event, deleting event, modifying event. If it's related, I turned off push notifications for my calendars.

What else can be tried, or what other details would help?

zhilianghu commented 3 years ago

My ItsyCal (on a Mac) is linked to my Google calendar. When I added an event using the ItsyCal, it gets to my Google calendar and populated to other devices, BUT it does not show up in ItsyCal where it was submitted. Even I quit ItsyCal and restarted it, the event is on my Google calendar NOT in ItsyCal.

sfsam commented 3 years ago

@zhilianghu Can you see any events for your Google calendar in Itsycal?

zhilianghu commented 3 years ago

@zhilianghu Can you see any events for your Google calendar in Itsycal?

Yes my older events are still on Itsycal.

Apro123 commented 3 years ago

The same issue is happening to me. My MacOS calendar shows my google events but not itsycal

dsevush-LiveData commented 3 years ago

Still happening for me. Update Google calendar, shows up later (hours?)

goose42 commented 2 years ago

Seeing the same issue with google calendar. I was able to "force" a refresh to get the updated events by disabling and then re-enabling the account on the Mac calendar app, then restarting Itsycal.

sweethuman commented 2 years ago

Still happens for me, sometimes it never updates. I had changed a recurring event in Calendar.app a week ago and ItsyCal hasn't yet picked up the update without restarting ItsyCal.app

jumban commented 1 year ago

Having the same issue here. Steps to reproduce 100% of the time:

  1. Create a new future event in the Calendar App
  2. Refresh with View > Refresh Calendars
  3. Open Itsycal - the newly created event doesn't show up, unless Itsycal is restarted.
  4. Restart Itsycal - the new event now shows up.

The same behaviour is observed for deletion of calendar events from the Calendar app. The changes are not reflected until Itsycal is restarted.

Running macOS 12.6.3 on M1 Macbook Pro.

jumban commented 1 year ago

Without doing anything, it seems that the issue has somehow fixed itself. New events are now being picked up by Itsycal without the need for a restart.