@@ -258,9 +258,10 @@ fun TimerScreen(
|
||||
shrinkVertically(motionScheme.defaultSpatialSpec())
|
||||
) {
|
||||
Text(
|
||||
"1 of 4",
|
||||
"${timerState.currentFocusCount} of ${timerState.totalFocusCount}",
|
||||
fontFamily = openRundeClock,
|
||||
style = typography.titleLarge
|
||||
style = typography.titleLarge,
|
||||
color = colorScheme.outline
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,9 @@ data class TimerState(
|
||||
val timerRunning: Boolean = false,
|
||||
val nextTimerMode: TimerMode = TimerMode.SHORT_BREAK,
|
||||
val nextTimeStr: String = "5:00",
|
||||
val showBrandTitle: Boolean = true
|
||||
val showBrandTitle: Boolean = true,
|
||||
val currentFocusCount: Int = 1,
|
||||
val totalFocusCount: Int = 4
|
||||
)
|
||||
|
||||
enum class TimerMode {
|
||||
|
||||
@@ -145,7 +145,9 @@ class TimerViewModel(
|
||||
timeStr = millisecondsToStr(time.value),
|
||||
totalTime = time.value,
|
||||
nextTimerMode = if (timerRepository.sessionLength > 1) TimerMode.SHORT_BREAK else TimerMode.LONG_BREAK,
|
||||
nextTimeStr = millisecondsToStr(if (timerRepository.sessionLength > 1) timerRepository.shortBreakTime else timerRepository.longBreakTime)
|
||||
nextTimeStr = millisecondsToStr(if (timerRepository.sessionLength > 1) timerRepository.shortBreakTime else timerRepository.longBreakTime),
|
||||
currentFocusCount = 1,
|
||||
totalFocusCount = timerRepository.sessionLength
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -173,7 +175,9 @@ class TimerViewModel(
|
||||
timerRepository.longBreakTime
|
||||
) else millisecondsToStr(
|
||||
timerRepository.shortBreakTime
|
||||
)
|
||||
),
|
||||
currentFocusCount = cycles / 2 + 1,
|
||||
totalFocusCount = timerRepository.sessionLength
|
||||
)
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user