Skip to content

Commit a19cb96

Browse files
BrayanDSOdavid-allison
authored andcommitted
feat(new reviewer): improve undo granularity
and match more the desktop code
1 parent e9ea8e4 commit a19cb96

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

AnkiDroid/src/main/java/com/ichi2/anki/ui/windows/reviewer/ReviewerViewModel.kt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,6 @@ class ReviewerViewModel(
314314
CollectionManager.TR.undoActionUndone(changes.operation)
315315
}
316316
actionFeedbackFlow.emit(message)
317-
updateCurrentCard()
318317
}
319318

320319
private suspend fun redo() {
@@ -327,7 +326,6 @@ class ReviewerViewModel(
327326
CollectionManager.TR.undoRedoAction(changes.operation)
328327
}
329328
actionFeedbackFlow.emit(message)
330-
updateCurrentCard()
331329
}
332330

333331
private suspend fun userAction(
@@ -613,12 +611,18 @@ class ReviewerViewModel(
613611
changes.noteText -> {
614612
val card = currentCard.await()
615613
withCol { card.load(this) }
614+
updateMarkIcon()
616615
if (showingAnswer.value) {
617616
showAnswer()
618617
} else {
619618
showQuestion()
620619
}
621620
}
621+
changes.card -> {
622+
val card = currentCard.await()
623+
withCol { card.load(this) }
624+
updateFlagIcon()
625+
}
622626
}
623627
}
624628
}

0 commit comments

Comments
 (0)