drop usage of flushSched()
This commit is contained in:
parent
8d429cd192
commit
d0d6aa1433
@ -124,30 +124,6 @@ insert or replace into cards values
|
|||||||
)
|
)
|
||||||
self.col.log(self)
|
self.col.log(self)
|
||||||
|
|
||||||
def flushSched(self) -> None:
|
|
||||||
self._preFlush()
|
|
||||||
# bug checks
|
|
||||||
self.col.db.execute(
|
|
||||||
"""update cards set
|
|
||||||
mod=?, usn=?, type=?, queue=?, due=?, ivl=?, factor=?, reps=?,
|
|
||||||
lapses=?, left=?, odue=?, odid=?, did=? where id = ?""",
|
|
||||||
self.mod,
|
|
||||||
self.usn,
|
|
||||||
self.type,
|
|
||||||
self.queue,
|
|
||||||
self.due,
|
|
||||||
self.ivl,
|
|
||||||
self.factor,
|
|
||||||
self.reps,
|
|
||||||
self.lapses,
|
|
||||||
self.left,
|
|
||||||
self.odue,
|
|
||||||
self.odid,
|
|
||||||
self.did,
|
|
||||||
self.id,
|
|
||||||
)
|
|
||||||
self.col.log(self)
|
|
||||||
|
|
||||||
def question(self, reload: bool = False, browser: bool = False) -> str:
|
def question(self, reload: bool = False, browser: bool = False) -> str:
|
||||||
return self.css() + self.render_output(reload, browser).question_text
|
return self.css() + self.render_output(reload, browser).question_text
|
||||||
|
|
||||||
@ -181,6 +157,8 @@ lapses=?, left=?, odue=?, odid=?, did=? where id = ?""",
|
|||||||
def note_type(self) -> NoteType:
|
def note_type(self) -> NoteType:
|
||||||
return self.col.models.get(self.note().mid)
|
return self.col.models.get(self.note().mid)
|
||||||
|
|
||||||
|
# legacy aliases
|
||||||
|
flushSched = flush
|
||||||
q = question
|
q = question
|
||||||
a = answer
|
a = answer
|
||||||
model = note_type
|
model = note_type
|
||||||
|
@ -80,7 +80,7 @@ class Scheduler(V2):
|
|||||||
self._updateStats(card, "time", card.timeTaken())
|
self._updateStats(card, "time", card.timeTaken())
|
||||||
card.mod = intTime()
|
card.mod = intTime()
|
||||||
card.usn = self.col.usn()
|
card.usn = self.col.usn()
|
||||||
card.flushSched()
|
card.flush()
|
||||||
|
|
||||||
def counts(self, card: Optional[Card] = None) -> Tuple[int, int, int]:
|
def counts(self, card: Optional[Card] = None) -> Tuple[int, int, int]:
|
||||||
counts = [self.newCount, self.lrnCount, self.revCount]
|
counts = [self.newCount, self.lrnCount, self.revCount]
|
||||||
|
@ -82,7 +82,7 @@ class Scheduler:
|
|||||||
self._updateStats(card, "time", card.timeTaken())
|
self._updateStats(card, "time", card.timeTaken())
|
||||||
card.mod = intTime()
|
card.mod = intTime()
|
||||||
card.usn = self.col.usn()
|
card.usn = self.col.usn()
|
||||||
card.flushSched()
|
card.flush()
|
||||||
|
|
||||||
def _answerCard(self, card: Card, ease: int) -> None:
|
def _answerCard(self, card: Card, ease: int) -> None:
|
||||||
if self._previewingCard(card):
|
if self._previewingCard(card):
|
||||||
|
Loading…
Reference in New Issue
Block a user