diff --git a/core/domain/src/main/kotlin/com/eblan/socialworkreviewer/core/domain/GetQuestionsUseCase.kt b/core/domain/src/main/kotlin/com/eblan/socialworkreviewer/core/domain/GetQuestionsUseCase.kt index f82ee0e..7c4cad6 100644 --- a/core/domain/src/main/kotlin/com/eblan/socialworkreviewer/core/domain/GetQuestionsUseCase.kt +++ b/core/domain/src/main/kotlin/com/eblan/socialworkreviewer/core/domain/GetQuestionsUseCase.kt @@ -28,10 +28,12 @@ class GetQuestionsUseCase @Inject constructor( id: String, numberOfQuestions: Int? = null, ): List { + val shuffledQuestions = questionRepository.getQuestions(id = id).shuffled() + return if (numberOfQuestions != null) { - questionRepository.getQuestions(id = id).shuffled().take(numberOfQuestions) + shuffledQuestions.take(numberOfQuestions) } else { - questionRepository.getQuestions(id = id).shuffled() + shuffledQuestions } } } diff --git a/framework/countdown-timer/src/main/kotlin/com/eblan/socialworkreviewer/framework/countdowntimer/AndroidCountDownTimerWrapper.kt b/framework/countdown-timer/src/main/kotlin/com/eblan/socialworkreviewer/framework/countdowntimer/AndroidCountDownTimerWrapper.kt index 77f8773..2dc1c51 100644 --- a/framework/countdown-timer/src/main/kotlin/com/eblan/socialworkreviewer/framework/countdowntimer/AndroidCountDownTimerWrapper.kt +++ b/framework/countdown-timer/src/main/kotlin/com/eblan/socialworkreviewer/framework/countdowntimer/AndroidCountDownTimerWrapper.kt @@ -22,7 +22,6 @@ import com.eblan.socialworkreviewer.core.model.CountDownTime import kotlinx.coroutines.channels.BufferOverflow import kotlinx.coroutines.flow.MutableSharedFlow import kotlinx.coroutines.flow.asSharedFlow -import java.util.Locale import javax.inject.Inject internal class AndroidCountDownTimerWrapper @Inject constructor() : CountDownTimerWrapper { @@ -72,8 +71,8 @@ internal class AndroidCountDownTimerWrapper @Inject constructor() : CountDownTim val minutes = totalSeconds / 60 - val remainingSeconds = totalSeconds % 60 + val seconds = totalSeconds % 60 - return String.format(Locale.getDefault(), "%02d %s %02d", minutes, ":", remainingSeconds) + return "%02d:%02d".format(minutes, seconds) } }