Skip to content

fix: update calendar on event notifications - #266

Merged
KristjanESPERANTO merged 1 commit into
MMRIZE:developfrom
dennisbrookner:main
Jul 31, 2026
Merged

fix: update calendar on event notifications#266
KristjanESPERANTO merged 1 commit into
MMRIZE:developfrom
dennisbrookner:main

Conversation

@dennisbrookner

Copy link
Copy Markdown
Contributor

Hi devs, thanks for such a great module!

This PR just adds one line of code, line 381 below, to MMM-CalendarExt3.js:

378-    if (notification === this.notifications.eventNotification) {
379-      const convertedPayload = this.notifications.eventPayload(payload)
380-      this.eventPool.set(sender.identifier, structuredClone(convertedPayload))
381:      this.updateAnimate()
382-    }

This makes it such that, when an eventNotification is received, the calendar refreshes (animates in and out) with the new events.

For my use case, the simplest thing was to make the refresh unconditional: every eventNotification triggers an updateAnimate call, and there's no way to stop it. But, if preferred, I'd be happy to gate the updateAnimate call in some sort of clause. It could be a config parameter that the user sets, or a parameter that's passed as part of the notification payload. In either case, we could preserve the existing default behavior if that is preferable.

@KristjanESPERANTO
KristjanESPERANTO changed the base branch from main to develop July 31, 2026 17:02
@KristjanESPERANTO KristjanESPERANTO changed the title add updateAnimate call to refresh calendar on event notifications fix: update calendar on event notifications Jul 31, 2026
@KristjanESPERANTO
KristjanESPERANTO merged commit 1f24619 into MMRIZE:develop Jul 31, 2026
1 check passed
@KristjanESPERANTO

Copy link
Copy Markdown
Member

Thank you! That's a useful improvement. I'll include it in the new release 🙂

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.

2 participants