Skip to content

Commit

Permalink
Fix calendar clipping before broadcast (#3679)
Browse files Browse the repository at this point in the history
-fixes #3678
  • Loading branch information
sdetweil authored Jan 3, 2025
1 parent 6f50a7b commit 75dbe67
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ planned for 2025-04-01

### Fixed

- [calendar] fix clipping events being broadcast (#3678)

## [2.30.0] - 2025-01-01

Thanks to: @xsorifc28, @HeikoGr, @bugsounet, @khassel, @KristjanESPERANTO, @rejas, @sdetweil.
Expand Down
10 changes: 7 additions & 3 deletions modules/default/calendar/calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -692,9 +692,13 @@ Module.register("calendar", {
by_url_calevents.sort(function (a, b) {
return a.startDate - b.startDate;
});
Log.debug(`pushing ${by_url_calevents.length} events to total with room for ${remainingEntries}`);
events = events.concat(by_url_calevents.slice(0, remainingEntries));
Log.debug(`events for calendar=${events.length}`);
if (limitNumberOfEntries) {
Log.debug(`pushing ${by_url_calevents.length} events to total with room for ${remainingEntries}`);
events = events.concat(by_url_calevents.slice(0, remainingEntries));
Log.debug(`events for calendar=${events.length}`);
} else {
events = events.concat(by_url_calevents);
}
}
Log.info(`sorting events count=${events.length}`);
events.sort(function (a, b) {
Expand Down

0 comments on commit 75dbe67

Please sign in to comment.