Skip to content

Commit 9698bd2

Browse files
authored
Bump Ical.Net from 4.3.1 to 5.1.1 (#3678)
1 parent deff96b commit 9698bd2

File tree

2 files changed

+10
-13
lines changed

2 files changed

+10
-13
lines changed

Directory.Packages.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<PackageVersion Include="EntityFramework" Version="6.5.1" />
2020
<PackageVersion Include="EntityFrameworkCore.Exceptions.PostgreSQL" Version="8.1.3" />
2121
<PackageVersion Include="HtmlAgilityPack" Version="1.12.1" />
22-
<PackageVersion Include="Ical.Net" Version="4.3.1" />
22+
<PackageVersion Include="Ical.Net" Version="5.1.1" />
2323
<PackageVersion Include="LinqKit.EntityFramework" Version="1.3.8" />
2424
<PackageVersion Include="mailgun_csharp" Version="0.9.0" />
2525
<PackageVersion Include="Markdig" Version="0.43.0" />
@@ -69,4 +69,4 @@
6969
<PackageVersion Include="xunit" Version="2.9.3" />
7070
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.5" />
7171
</ItemGroup>
72-
</Project>
72+
</Project>

src/JoinRpg.WebPortal.Managers/Schedule/SchedulePageManager.cs

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public async Task<string> GetIcalSchedule()
5151
calendar.Events.AddRange(result.AllItems.Select(BuildIcalEvent));
5252

5353
var serializer = new CalendarSerializer();
54-
return serializer.SerializeToString(calendar); //TODO stream
54+
return serializer.SerializeToString(calendar) ?? ""; //TODO stream
5555
}
5656

5757
private CalendarEvent BuildIcalEvent(ProgramItemPlaced evt)
@@ -61,9 +61,8 @@ private CalendarEvent BuildIcalEvent(ProgramItemPlaced evt)
6161
Start = new CalDateTime(evt.StartTime.LocalDateTime),
6262
End = new CalDateTime(evt.EndTime.LocalDateTime),
6363
Summary = evt.ProgramItem.Name,
64-
IsAllDay = false,
6564
Location = string.Join(", ", evt.Rooms.Select(r => r.Name)),
66-
Description = evt.ProgramItem.Description.ToPlainText(),
65+
Description = evt.ProgramItem.Description.ToPlainTextWithoutHtmlEscape(),
6766
};
6867
}
6968

@@ -121,15 +120,13 @@ private void BuildAppointments(Project project, SchedulePageViewModel viewModel)
121120
ProjectId = slot.ProjectId,
122121
CharacterId = slot.Id,
123122
Users = slot.Users,
123+
Rooms = [.. viewModel.Columns
124+
.SkipWhile((v, index) => index < colIndex)
125+
.Take(slot.ColSpan)],
126+
Slots = [.. viewModel.Rows
127+
.SkipWhile((v, index) => index < rowIndex)
128+
.Take(slot.RowSpan)]
124129
};
125-
appointment.Rooms = viewModel.Columns
126-
.SkipWhile((v, index) => index < colIndex)
127-
.Take(slot.ColSpan)
128-
.ToArray();
129-
appointment.Slots = viewModel.Rows
130-
.SkipWhile((v, index) => index < rowIndex)
131-
.Take(slot.RowSpan)
132-
.ToArray();
133130
result.Add(appointment);
134131
}
135132
}

0 commit comments

Comments
 (0)