fix calendar not showing events with the same name and start date but different calendar url#3166
fix calendar not showing events with the same name and start date but different calendar url#3166rejas merged 6 commits intoMagicMirrorOrg:developfrom Paranoid93:develop
Conversation
…t different calendar url
|
Thx for the PR, unfortunately your test is failing. Can you have a look? |
|
I'm not that deep into the code. The better solution would probably be to compare some event ID. But for this use case the change should fix it |
|
please run |
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## develop #3166 +/- ##
===========================================
+ Coverage 25.51% 26.23% +0.71%
===========================================
Files 53 53
Lines 11501 11502 +1
===========================================
+ Hits 2935 3018 +83
+ Misses 8566 8484 -82
|
modules/default/calendar/calendar.js
Outdated
| for (const e in calendar) { | ||
| const event = JSON.parse(JSON.stringify(calendar[e])); // clone object | ||
|
|
||
| event.url = calendarUrl; |
There was a problem hiding this comment.
this is because otherwise the url isn't set yet for the comparison in listContainsEvent() in line 574.
But a better solution would be to compare events based on their UID. But for this I'd need more code (and javascript :D) knowledge
|
Sorry for the long delay until I commented more. Now I had the time to look at the code myself and I'd rather add a new config option |
Updating regarding PR MagicMirrorOrg/MagicMirror#3166
* Updating calendar documentation Updating regarding PR MagicMirrorOrg/MagicMirror#3166 * Update calendar.md fix typo * Update calendar.md fix description
I fixed the calendar module, which did not show calendar entries from different calendars that share the same name and start date.
My use case: We have each office days documented in each an own calendar. If both "Office" Calendar entries start at the same date just one was shown
Google Calendar (each Office event in an own calendar)

Before

After
