Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broadcast custom symbols in CALENDAR_EVENTS #2754

Merged
merged 3 commits into from
Dec 29, 2021

Conversation

kolbyjack
Copy link
Contributor

I added support for displaying event symbols to MMM-MonthlyCalendar, and received a bug report that custom symbols aren't being displayed. Move the custom event logic into symbolsForEvent so that they are properly set in the CALENDAR_EVENTS message.

@codecov-commenter
Copy link

codecov-commenter commented Dec 26, 2021

Codecov Report

Merging #2754 (bf83341) into develop (c4d2a7b) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #2754   +/-   ##
========================================
  Coverage    68.67%   68.67%           
========================================
  Files            8        8           
  Lines          265      265           
========================================
  Hits           182      182           
  Misses          83       83           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c4d2a7b...bf83341. Read the comment docs.

@@ -237,18 +237,6 @@ Module.register("calendar", {
symbolWrapper.className = "symbol align-right " + symbolClass;

const symbols = this.symbolsForEvent(event);
// If symbols are displayed and custom symbol is set, replace event symbol
if (this.config.displaySymbol && this.config.customEvents.length > 0) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check isnt in the added code. Dont we need it there?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe so, the check was redundant in the old location, it was already inside an if (this.config.displaySymbol), and the other call should have the custom symbol information even if symbols aren't being displayed, since it's populating the notification message

@MichMich MichMich merged commit 7a7ed48 into MagicMirrorOrg:develop Dec 29, 2021
@kolbyjack kolbyjack deleted the broadcast-custom-symbols branch December 30, 2021 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants