Skip to content

Commit

Permalink
imp - Clean up the reminder and the event list
Browse files Browse the repository at this point in the history
---

We need to also do this for the reminder and the event infoboxes.

---

Type: imp
Breaking: False
Doc Required: False
Part: 1/1
  • Loading branch information
AptiviCEO committed Feb 26, 2024
1 parent d448bf4 commit 87d08e3
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,6 @@ private static (int Year, int Month, int Day, CalendarTypes calendar) ListRemind
{
// Populate some variables
var CurrentDate = new DateTime(year, month, CurrentDay);
builder.AppendLine($"{month}/{CurrentDay}/{year}");

// Render the reminders
foreach (ReminderInfo Reminder in ReminderManager.Reminders)
Expand All @@ -630,7 +629,10 @@ private static (int Year, int Month, int Day, CalendarTypes calendar) ListRemind
var (rYear, rMonth, rDay, _) = TimeDateConverters.GetDateFromCalendar(new DateTime(rDate.Year, rDate.Month, rDate.Day), state.calendar);
rDate = new(rYear, rMonth, rDay);
if (rDate == CurrentDate)
{
builder.AppendLine($"{month}/{CurrentDay}/{year}");
builder.AppendLine($" {Reminder.ReminderTitle}");
}
}
}
InfoBoxColor.WriteInfoBox(builder.ToString());
Expand All @@ -649,7 +651,6 @@ private static (int Year, int Month, int Day, CalendarTypes calendar) ListEvents
{
// Populate some variables
var CurrentDate = new DateTime(year, month, CurrentDay);
builder.AppendLine($"{month}/{CurrentDay}/{year}");

// Render the events
foreach (EventInfo EventInstance in EventManager.CalendarEvents.Union(EventManager.baseEvents))
Expand All @@ -666,7 +667,10 @@ private static (int Year, int Month, int Day, CalendarTypes calendar) ListEvents
eDate = new(eYear, eMonth, eDay);
if (((EventInstance.IsYearly && CurrentDate >= sDate && CurrentDate <= eDate) ||
(!EventInstance.IsYearly && CurrentDate == nDate)))
{
builder.AppendLine($"{month}/{CurrentDay}/{year}");
builder.AppendLine($" {EventInstance.EventTitle}");
}
}
}
InfoBoxColor.WriteInfoBox(builder.ToString());
Expand Down

0 comments on commit 87d08e3

Please sign in to comment.