File tree Expand file tree Collapse file tree
libanki/src/main/java/com/ichi2/anki/libanki/sched Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -149,17 +149,17 @@ open class Scheduler(
149149 }
150150
151151 /* * Legacy path, used by tests. */
152- open fun answerCard (
153- card : Card ,
154- rating : Rating ,
155- ) {
156- val top = queuedCards.cardsList.first( )
157- val answer = buildAnswer(card, top. states, rating)
158- col.backend.answerCard(answer)
159- numberOfAnswersRecorded + = 1
160- // tests assume the card was mutated
161- card.load(col)
162- }
152+ open fun answerCard (
153+ card : Card ,
154+ rating : Rating ,
155+ ) {
156+ val states = col.backend.getSchedulingStates(card.id )
157+ val answer = buildAnswer(card, states, rating)
158+ col.backend.answerCard(answer)
159+ numberOfAnswersRecorded + = 1
160+ // tests assume the card was mutated
161+ card.load(col)
162+ }
163163
164164 /* * True if new state marks the card as a leech. */
165165 @LibAnkiAlias(" state_is_leech" )
You can’t perform that action at this time.
0 commit comments