diff --git a/AnkiDroid/src/main/java/com/ichi2/anki/Reviewer.kt b/AnkiDroid/src/main/java/com/ichi2/anki/Reviewer.kt index a23adcde7375..4cffcc373a9b 100644 --- a/AnkiDroid/src/main/java/com/ichi2/anki/Reviewer.kt +++ b/AnkiDroid/src/main/java/com/ichi2/anki/Reviewer.kt @@ -1208,11 +1208,16 @@ open class Reviewer : topCard.renderOutput(this@withCol, reload = true) } } - state?.timeboxReached?.let { dealWithTimeBox(it) } + currentCard = state?.topCard queueState = state } + /** + * Answer the current card, update the scheduler and checks if the timebox limit has been reached + * and, if so, displays a dialog to the user + * @param rating The user's rating for the card + */ override suspend fun answerCardInner(rating: Rating) { val state = queueState!! val cardId = currentCard!!.id @@ -1235,6 +1240,12 @@ open class Reviewer : showSnackbar(leechMessage, Snackbar.LENGTH_SHORT) } } + + // showing the timebox reached dialog if the timebox is reached + val timebox = withCol { timeboxReached() } + if (timebox != null) { + dealWithTimeBox(timebox) + } } private suspend fun dealWithTimeBox(timebox: Collection.TimeboxReached) {