Closed Caceresenzo closed 5 years ago
Oh my god....
I was still using the (very) old function to "match" event to a specific month and year.
The problem was the month - 1
, removing it fixed everything.
Old function:
public static boolean eventMatches(VirtualCalendarEvent event, int year, int month) {
Calendar startTime = event.getStart().toCalendar();
Calendar endTime = event.getEnd().toCalendar();
return (startTime.get(Calendar.YEAR) == year && startTime.get(Calendar.MONTH) == month - 1)
|| (endTime.get(Calendar.YEAR) == year && endTime.get(Calendar.MONTH) == month - 1);
}
Modification:
return (startTime.get(Calendar.YEAR) == year && startTime.get(Calendar.MONTH) == month)
|| (endTime.get(Calendar.YEAR) == year && endTime.get(Calendar.MONTH) == month);
Glad it’s working now 😊
Describe the bug While going to one month to another, the monthloader seems to "loose" the previous month. (English is not my first language, and i am not sure how to describe my problem, sorry for my bad writing)
Here are the logs while switching from month to month:
If you haven't understand anything, take a look at the gif below
To Reproduce Steps to reproduce the behavior:
Expected behavior I've tested with the version 3.2.1, everything was working fine.
Screenshots If applicable, add screenshots or a screen recording to help explain your problem.
Additional context