mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-02-17 07:33:57 +00:00
fix(calendar): Flatten cycle change: the day at 00:00 is now used to retrieve all occurrences. This change should resolve the issue where resource availability is not detected if the event is shorter than the occurrence duration in the resource.
This commit is contained in:
@@ -1381,6 +1381,7 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
|
||||
|
||||
// Calculate the occurrences for the given range
|
||||
records = [NSMutableArray array];
|
||||
|
||||
ranges = [NSMutableArray arrayWithArray:
|
||||
[iCalRecurrenceCalculator recurrenceRangesWithinCalendarDateRange: recurrenceRange
|
||||
firstInstanceCalendarDateRange: firstRange
|
||||
@@ -1446,7 +1447,16 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
|
||||
max = [_records count];
|
||||
ma = [NSMutableArray arrayWithCapacity: max];
|
||||
|
||||
_r = [NGCalendarDateRange calendarDateRangeWithStartDate: [_r startDate]
|
||||
NSCalendarDate *originalDate = [_r startDate];
|
||||
|
||||
// Adjust the start date to the beginning of the day to ensure it intersects with events where the new event starts after an existing event’s start time.
|
||||
_r = [NGCalendarDateRange calendarDateRangeWithStartDate:[NSCalendarDate dateWithYear:originalDate.yearOfCommonEra
|
||||
month:originalDate.monthOfYear
|
||||
day:originalDate.dayOfMonth
|
||||
hour:0
|
||||
minute:0
|
||||
second:0
|
||||
timeZone:originalDate.timeZone]
|
||||
endDate: [_r endDate]];
|
||||
|
||||
for (count = 0; count < max; count++)
|
||||
|
||||
Reference in New Issue
Block a user