Auto commit Sat Mar 21 11:01:02 PM CDT 2026
This commit is contained in:
@@ -5,3 +5,9 @@ import com.mindmachine.mvp.domain.RuntimeState
|
||||
fun shouldShowActiveControlsByDefault(runtimeState: RuntimeState): Boolean {
|
||||
return runtimeState != RuntimeState.RUNNING && runtimeState != RuntimeState.COUNTDOWN
|
||||
}
|
||||
|
||||
fun sessionProgressFraction(durationSec: Int, remainingSec: Int): Float {
|
||||
val total = durationSec.coerceAtLeast(1)
|
||||
val elapsed = (total - remainingSec).coerceIn(0, total)
|
||||
return elapsed.toFloat() / total.toFloat()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user