0
0
mirror of https://github.com/ankidroid/Anki-Android.git synced 2024-09-20 12:02:16 +02:00

Make answer card undoable

This commit is contained in:
Daniel Svärd 2010-02-08 17:52:45 +01:00
parent 3cd791e366
commit 5d23502620

View File

@ -208,7 +208,7 @@ public class Deck
Stack<UndoRow> redoStack;
boolean undoEnabled;
boolean undoEnabled = false;
private void initVars()
{
@ -651,6 +651,8 @@ public class Deck
public void answerCard(Card card, int ease)
{
String undoName = "Answer Card";
setUndoStart(undoName);
double now = System.currentTimeMillis() / 1000.0;
// Old state
@ -798,6 +800,7 @@ public class Deck
// // TODO: Fix leech handling
// if (isLeech(card))
// card = handleLeech(card);
setUndoEnd(undoName);
}
public void decreaseCounts(Card card)