mirror of
https://codeberg.org/timelimit/timelimit-android.git
synced 2025-10-03 01:39:22 +02:00
Fix issue when merging multiple overlapping time areas with the same start time
This commit is contained in:
parent
7ac2a6e299
commit
12dfd6d65f
1 changed files with 4 additions and 1 deletions
|
@ -164,7 +164,10 @@ class BlockedTimesData (val ranges: RangeList) {
|
|||
else if (previous.last + 1 < r.first) {
|
||||
result.add(previous)
|
||||
result.add(r)
|
||||
} else result.add(Range(previous.first, r.last))
|
||||
} else result.add(Range(
|
||||
previous.first,
|
||||
r.last.coerceAtLeast(previous.last)
|
||||
))
|
||||
}
|
||||
|
||||
return RangeList(result)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue