MagicMirror icon indicating copy to clipboard operation
MagicMirror copied to clipboard

Calendar module - Hidden private events

Open borishalleux opened this issue 3 years ago • 5 comments

Hello,

With the default calendar module, when you hide private events, they are still counted in a maximum number of events to display. personally i think they shouldn’t be displayed to have a more complete view of the calendar, right?

Sorry for my English, Google translation, I only speak French.

borishalleux avatar Jun 12 '21 08:06 borishalleux

hi @borishalleux I agree, it would be more logial to not count the private events. Would you like to probide a PR for this topic or is this just a feature request :-) ? Cheers

rejas avatar Jun 13 '21 08:06 rejas

Hello, For me this is not a feature but a correction. But I don't know enough about GitHub to know what to do with my post next.

borishalleux avatar Jun 15 '21 15:06 borishalleux

Maybe @MichMich can add the "PR welcome" label to this issue (if he agrees with the content) so that other might add it?

rejas avatar Jun 24 '21 14:06 rejas

Done!

MichMich avatar Jun 24 '21 15:06 MichMich

Based on the current code (https://github.com/MichMich/MagicMirror/blob/master/modules/default/calendar/calendar.js#L491 and https://github.com/MichMich/MagicMirror/blob/master/modules/default/calendar/calendar.js#L573) its not counting private events when calculating maximumEntries.

@borishalleux can you post your Calendar config and some more details about your events? I'm struggling to reproduce your edge case

relm923 avatar Jun 30 '21 02:06 relm923

I've done some testing and I also think this is fixed in the current code

				if (this.config.hidePrivate && event.class === "PRIVATE") {
					// do not add the current event, skip it
					continue;
				}

So closing ...

khassel avatar Sep 27 '23 19:09 khassel