drop usage of flushSched()

This commit is contained in:
Damien Elmes 2020-03-08 18:55:10 +10:00
parent 8d429cd192
commit d0d6aa1433
3 changed files with 4 additions and 26 deletions

View File

@ -124,30 +124,6 @@ insert or replace into cards values
)
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:
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:
return self.col.models.get(self.note().mid)
# legacy aliases
flushSched = flush
q = question
a = answer
model = note_type

View File

@ -80,7 +80,7 @@ class Scheduler(V2):
self._updateStats(card, "time", card.timeTaken())
card.mod = intTime()
card.usn = self.col.usn()
card.flushSched()
card.flush()
def counts(self, card: Optional[Card] = None) -> Tuple[int, int, int]:
counts = [self.newCount, self.lrnCount, self.revCount]

View File

@ -82,7 +82,7 @@ class Scheduler:
self._updateStats(card, "time", card.timeTaken())
card.mod = intTime()
card.usn = self.col.usn()
card.flushSched()
card.flush()
def _answerCard(self, card: Card, ease: int) -> None:
if self._previewingCard(card):