Skip to content

Commit

Permalink
Fixed issue with overlapping events
Browse files Browse the repository at this point in the history
  • Loading branch information
Ralph Maalouf committed Sep 29, 2023
1 parent 6ae1800 commit 5986ddc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/src/event_arrangers/merge_event_arranger.dart
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,15 @@ class MergeEventArranger<T extends Object?> extends EventArranger<T> {

bool _checkIsOverlapping(int arrangedEventStart, int arrangedEventEnd,
int eventStart, int eventEnd) {
return (arrangedEventStart >= eventStart &&
var result = (arrangedEventStart >= eventStart &&
arrangedEventStart <= eventEnd) ||
(arrangedEventEnd >= eventStart && arrangedEventEnd <= eventEnd) ||
(eventStart >= arrangedEventStart && eventStart <= arrangedEventEnd) ||
(eventEnd >= arrangedEventStart && eventEnd <= arrangedEventEnd);

if (result) {
result = result && (arrangedEventEnd != eventStart);
}
return result;
}
}

0 comments on commit 5986ddc

Please sign in to comment.