fix open online bug, status bug

This commit is contained in:
Damien Elmes 2009-01-07 10:16:44 +09:00
parent 2ad2c0bf5c
commit 182610b898
2 changed files with 4 additions and 2 deletions

View file

@ -1448,7 +1448,9 @@ day = :d""", d=yesterday)
self.deck.s.flush()
self.deck.s.commit()
if self.loadAfterSync == 2:
# special case for open online: mark temp deck as in-memory
# ugly hack for open online: mark temp deck as in-memory
self.deck.tmpMediaDir = re.sub(
"(?i)\.(anki)$", ".media", self.deck.path)
self.deck.path = None
self.deck.flushMod()
elif not self.hideWelcome:

View file

@ -231,7 +231,7 @@ You should aim to answer each question within<br>
return
if not self.timer:
return
if self.main.state in ("showQuestion", "showAnswer"):
if self.main.deck and self.main.state in ("showQuestion", "showAnswer"):
if self.main.currentCard:
if self.main.deck.sessionStartTime:
t = time.time() - self.main.deck.sessionStartTime