mirror of
https://codeberg.org/timelimit/timelimit-android.git
synced 2025-10-05 19:42:20 +02:00
Allow inverting single tile for the blocked time areas
This commit is contained in:
parent
12dfd6d65f
commit
e900695cba
1 changed files with 1 additions and 1 deletions
|
@ -219,7 +219,7 @@ object ManageCategoryBlockedTimes {
|
|||
val range = Pair(selectedMinuteOfWeek, minute).sorted().let { (from, to) -> BlockedTimesData.Range(from, to) }
|
||||
val oldBlockedTimeAreas = blockedTimeAreasLive.first()
|
||||
|
||||
val willBlockRange = isChild || oldBlockedTimeAreas.ranges.readFrom(range.first).countSetBits(range.last - range.first + 1) < (range.last - range.first) / 2
|
||||
val willBlockRange = isChild || oldBlockedTimeAreas.ranges.readFrom(range.first).countSetBits(range.last - range.first + 1) <= (range.last - range.first) / 2
|
||||
|
||||
val newBlockedTimeAreas = oldBlockedTimeAreas.withUpdatedRange(range, willBlockRange)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue