File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
AnkiDroid/src/main/java/com/ichi2/anki Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -1206,11 +1206,16 @@ open class Reviewer :
12061206 topCard.renderOutput(this @withCol, reload = true )
12071207 }
12081208 }
1209- state?.timeboxReached?. let { dealWithTimeBox(it) }
1209+
12101210 currentCard = state?.topCard
12111211 queueState = state
12121212 }
12131213
1214+ /* *
1215+ * Answer the current card, update the scheduler and checks if the timebox limit has been reached
1216+ * and, if so, displays a dialog to the user
1217+ * @param rating The user's rating for the card
1218+ */
12141219 override suspend fun answerCardInner (rating : Rating ) {
12151220 val state = queueState!!
12161221 val cardId = currentCard!! .id
@@ -1233,6 +1238,12 @@ open class Reviewer :
12331238 showSnackbar(leechMessage, Snackbar .LENGTH_SHORT )
12341239 }
12351240 }
1241+
1242+ // showing the timebox reached dialog if the timebox is reached
1243+ val timebox = withCol { timeboxReached() }
1244+ if (timebox != null ) {
1245+ dealWithTimeBox(timebox)
1246+ }
12361247 }
12371248
12381249 private suspend fun dealWithTimeBox (timebox : Collection .TimeboxReached ) {
You can’t perform that action at this time.
0 commit comments