From e985389281d7025391a532428a2b88ad4183fbb9 Mon Sep 17 00:00:00 2001 From: Goodhope Ordu Date: Thu, 8 Aug 2019 19:54:21 +0100 Subject: [PATCH] Quiz questions count fix --- .../main/java/com/orsteg/gesos/androidquizkit/quiz/Quiz.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/androidquizkit/src/main/java/com/orsteg/gesos/androidquizkit/quiz/Quiz.kt b/androidquizkit/src/main/java/com/orsteg/gesos/androidquizkit/quiz/Quiz.kt index 0d87824..24a2094 100644 --- a/androidquizkit/src/main/java/com/orsteg/gesos/androidquizkit/quiz/Quiz.kt +++ b/androidquizkit/src/main/java/com/orsteg/gesos/androidquizkit/quiz/Quiz.kt @@ -111,9 +111,9 @@ abstract class Quiz (var topic: String, private var mConfig: Config): private fun resolveQuestionCount() = min(kotlin.run { val n = mConfig.questionCount - if (n < 0) getTotalQuestions() - 1 + if (n < 0) getTotalQuestions() else mConfig.questionCount - }, getTotalQuestions() - 1) + }, getTotalQuestions()) interface QuizInterface {