fixes beeping to 3.2.1 cycle

This commit is contained in:
2026-05-26 12:31:28 -07:00
parent 51c7fa1464
commit 6ba2f2cfdf
@@ -61,14 +61,10 @@ class CountdownDialog(
val progress = millisUntilFinished.toFloat() / durationMillis val progress = millisUntilFinished.toFloat() / durationMillis
cvCountdown.setProgress(progress) cvCountdown.setProgress(progress)
if (millisUntilFinished >= durationMillis) {
cvCountdown.setText(context.getString(R.string.countdown_text))
} else {
val secondsLeft = (millisUntilFinished / 1000).toInt() + 1 val secondsLeft = (millisUntilFinished / 1000).toInt() + 1
cvCountdown.setText(secondsLeft.toString()) cvCountdown.setText(secondsLeft.toString())
}
if (millisUntilFinished <= 3000 && millisUntilFinished > 1000) { if (secondsLeft >= 1 && secondsLeft <= 3) {
playTone(ToneGenerator.TONE_PROP_BEEP) playTone(ToneGenerator.TONE_PROP_BEEP)
if (prefs.getBoolean("vibration", true)) { if (prefs.getBoolean("vibration", true)) {
vibrator?.vibrate(50) vibrator?.vibrate(50)