Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ _This release is scheduled to be released on 2022-07-01._
- Use latest node 18 when running tests on github actions
- Update `electron` to v19 and other dependencies.
- Use internal fetch function of node instead external `node-fetch` library if used node version >= `v18`.
- Include duplicate events in broadcasts.

### Fixed

Expand Down
18 changes: 8 additions & 10 deletions modules/default/calendar/calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -496,22 +496,20 @@ Module.register("calendar", {
for (const e in calendar) {
const event = JSON.parse(JSON.stringify(calendar[e])); // clone object

if (event.endDate < now && limitNumberOfEntries) {
if (this.config.hidePrivate && event.class === "PRIVATE") {
// do not add the current event, skip it
continue;
}
if (this.config.hidePrivate) {
if (event.class === "PRIVATE") {
// do not add the current event, skip it
if (limitNumberOfEntries) {
if (event.endDate < now) {
continue;
}
}
if (this.config.hideOngoing && limitNumberOfEntries) {
if (event.startDate < now) {
if (this.config.hideOngoing && event.startDate < now) {
continue;
}
if (this.listContainsEvent(events, event)) {
continue;
}
}
if (this.listContainsEvent(events, event)) {
continue;
}
event.url = calendarUrl;
event.today = event.startDate >= today && event.startDate < today + 24 * 60 * 60 * 1000;
Expand Down