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 27, 2023
1 parent 6ae1800 commit 5965c0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/extensions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ extension MyList on List<CalendarEventData> {
void addEventInSortedManner(CalendarEventData event) {
var addIndex = -1;
for (var i = 0; i < this.length; i++) {
if (event.startTime!.compareTo(this[i].startTime!) <= 0) {
if ( event.startTime!.compareTo(this[i].startTime!) <= 0 && event.endTime!.compareTo(this[i].endTime!) >= 0) {
addIndex = i;
break;
}
Expand Down

0 comments on commit 5965c0c

Please sign in to comment.