feat: fix context null after syncing.

This commit is contained in:
rabbitism
2024-06-25 23:45:32 +08:00
parent 35fbf47b72
commit a459205d78
3 changed files with 17 additions and 2 deletions

View File

@@ -36,6 +36,11 @@ public sealed class CalendarContext(int? year = null, int? month = null, int? st
{
month++;
}
if (month is null)
{
month = 1;
}
return new CalendarContext(year, month, StartYear, EndYear);
}
@@ -52,6 +57,10 @@ public sealed class CalendarContext(int? year = null, int? month = null, int? st
{
month--;
}
if (month is null)
{
month = 1;
}
return new CalendarContext(year, month, StartYear, EndYear);
}