kolbyjack / MMM-MonthlyCalendar

MIT License
26 stars 19 forks source link

Hide Duplicates #37

Open technerdmike opened 3 months ago

technerdmike commented 3 months ago

Is it possible to hide events with the same title and same datetime. For example, events that appear on both my partner's and my calendar because we are both invited to the same meeting?

Thanks

kolbyjack commented 3 months ago

Can you try the hideDuplicateEvents branch and set hideDuplicateEvents: true in your config? If it works, let me know and I'll merge it to main.

technerdmike commented 3 months ago

Hi! Thanks for the prompt response. I checked out the branch and added the hideDuplicateEvents: true, restarted, and nothing changed. I then tried adding the hide duplicate events config in both the default calendar and then in the MMM-MonthlyCalendar config. Neither locations made any change. It looks like the modifications are partially working since I then tested two events into a single calendar, which it did successfully remove!

Since the calendar displays both my wife's Google Calendar and mine, events that we are both invited to still display in the calendar.

Thanks!

esses commented 2 weeks ago

I added some more granular event comparison logic and have this working on my MagicMirror based on the hideDuplicateEvents branch! PR created.

esses commented 2 weeks ago

So with further testing it turns out my PR was a bit buggy.

Digging in to the code, I modified the broadcastEvents function in the default MagicMirror calendar module setting:

const eventList = this.createEventList(true);

As hideDuplicates is already set to true by default, the calendar module is then broadcasting an already deduped list to MMM-MonthlyCalendar.