mirror of
https://codeberg.org/timelimit/timelimit-android.git
synced 2025-10-03 17:59:51 +02:00
Add counting background music playback
This commit is contained in:
parent
c632609211
commit
192b871ae5
13 changed files with 694 additions and 301 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* TimeLimit Copyright <C> 2019 Jonas Lochmann
|
||||
* TimeLimit Copyright <C> 2019- 2020 Jonas Lochmann
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -19,6 +19,9 @@ import android.util.SparseLongArray
|
|||
import io.timelimit.android.data.model.TimeLimitRule
|
||||
|
||||
data class RemainingTime(val includingExtraTime: Long, val default: Long) {
|
||||
val hasRemainingTime = includingExtraTime > 0
|
||||
val usingExtraTime = includingExtraTime > 0 && default == 0L
|
||||
|
||||
init {
|
||||
if (includingExtraTime < 0 || default < 0) {
|
||||
throw IllegalStateException("time is < 0")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue