Auto commit Sat Mar 21 11:01:02 PM CDT 2026

This commit is contained in:
Tretzi
2026-03-21 23:01:02 -05:00
parent 5c48387dc2
commit 869c98a47c
11 changed files with 354 additions and 104 deletions

View File

@@ -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()
}