mirror of
https://github.com/ankitects/anki.git
synced 2025-11-09 14:17:13 -05:00
fix a bug with relativeDelay not being set on card answer
This commit is contained in:
parent
d57a371ca5
commit
bd7f5787cc
2 changed files with 8 additions and 2 deletions
|
|
@ -285,7 +285,7 @@ spaceUntil = :spaceUntil,
|
||||||
isDue = 0,
|
isDue = 0,
|
||||||
type = :type,
|
type = :type,
|
||||||
combinedDue = :combinedDue,
|
combinedDue = :combinedDue,
|
||||||
relativeDelay = 0,
|
relativeDelay = :relativeDelay,
|
||||||
priority = :priority
|
priority = :priority
|
||||||
where id=:id""", self.__dict__)
|
where id=:id""", self.__dict__)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ SEARCH_FIELD = 6
|
||||||
SEARCH_FIELD_EXISTS = 7
|
SEARCH_FIELD_EXISTS = 7
|
||||||
SEARCH_QA = 8
|
SEARCH_QA = 8
|
||||||
SEARCH_PHRASE_WB = 9
|
SEARCH_PHRASE_WB = 9
|
||||||
DECK_VERSION = 64
|
DECK_VERSION = 65
|
||||||
|
|
||||||
deckVarsTable = Table(
|
deckVarsTable = Table(
|
||||||
'deckVars', metadata,
|
'deckVars', metadata,
|
||||||
|
|
@ -4399,6 +4399,12 @@ or editFontSize is null""")
|
||||||
deck.version = 64
|
deck.version = 64
|
||||||
deck.s.commit()
|
deck.s.commit()
|
||||||
# note: we keep the priority index for now
|
# note: we keep the priority index for now
|
||||||
|
if deck.version < 65:
|
||||||
|
# we weren't correctly setting relativeDelay when answering cards
|
||||||
|
# in previous versions, so ensure everything is set correctly
|
||||||
|
deck.rebuildTypes()
|
||||||
|
deck.version = 65
|
||||||
|
deck.s.commit()
|
||||||
# executing a pragma here is very slow on large decks, so we store
|
# executing a pragma here is very slow on large decks, so we store
|
||||||
# our own record
|
# our own record
|
||||||
if not deck.getInt("pageSize") == 4096:
|
if not deck.getInt("pageSize") == 4096:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue