mirror of
https://codeberg.org/timelimit/timelimit-android.git
synced 2025-10-03 17:59:51 +02:00
Fix counting time for inactive slots
This commit is contained in:
parent
a0a1c20e10
commit
a638b35dd2
2 changed files with 7 additions and 5 deletions
|
@ -44,7 +44,7 @@ data class RemainingTime(val includingExtraTime: Long, val default: Long) {
|
|||
)
|
||||
}
|
||||
|
||||
private fun getRulesRelatedToDay(dayOfWeek: Int, minuteOfDay: Int, rules: List<TimeLimitRule>): List<TimeLimitRule> {
|
||||
fun getRulesRelatedToDay(dayOfWeek: Int, minuteOfDay: Int, rules: List<TimeLimitRule>): List<TimeLimitRule> {
|
||||
return rules.filter {
|
||||
((it.dayMask.toInt() and (1 shl dayOfWeek)) != 0) &&
|
||||
minuteOfDay >= it.startMinuteOfDay && minuteOfDay <= it.endMinuteOfDay
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue