File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed
Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -496,22 +496,20 @@ Module.register("calendar", {
496496 for ( const e in calendar ) {
497497 const event = JSON . parse ( JSON . stringify ( calendar [ e ] ) ) ; // clone object
498498
499- if ( event . endDate < now && limitNumberOfEntries ) {
499+ if ( this . config . hidePrivate && event . class === "PRIVATE" ) {
500+ // do not add the current event, skip it
500501 continue ;
501502 }
502- if ( this . config . hidePrivate ) {
503- if ( event . class === "PRIVATE" ) {
504- // do not add the current event, skip it
503+ if ( limitNumberOfEntries ) {
504+ if ( event . endDate < now ) {
505505 continue ;
506506 }
507- }
508- if ( this . config . hideOngoing && limitNumberOfEntries ) {
509- if ( event . startDate < now ) {
507+ if ( this . config . hideOngoing && event . startDate < now ) {
508+ continue ;
509+ }
510+ if ( this . listContainsEvent ( events , event ) ) {
510511 continue ;
511512 }
512- }
513- if ( this . listContainsEvent ( events , event ) && limitNumberOfEntries ) {
514- continue ;
515513 }
516514 event . url = calendarUrl ;
517515 event . today = event . startDate >= today && event . startDate < today + 24 * 60 * 60 * 1000 ;
You can’t perform that action at this time.
0 commit comments