From 143a78dd2a5f6a5c1b00e326b9b0cf3c2d47967d Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 29 Apr 2009 12:12:07 +0900 Subject: [PATCH] handle buried cards in deck load --- anki/deck.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/anki/deck.py b/anki/deck.py index d9b35415a..983117442 100644 --- a/anki/deck.py +++ b/anki/deck.py @@ -2563,9 +2563,13 @@ class DeckStorage(object): deck.updateDynamicIndices() # save counts to determine if we should save deck after check oldc = deck.failedSoonCount + deck.revCount + deck.newCount - # update counts & unsuspend reviewed early cards + # update counts deck.rebuildQueue() - deck.resetAfterReviewEarly() + # unsuspend reviewed early & buried + ids = deck.s.column0("select id from cards where priority in (-1, -2)") + if ids: + deck.updatePriorities(ids) + deck.checkDue() if ((oldc != deck.failedSoonCount + deck.revCount + deck.newCount) or deck.modifiedSinceSave()): # we don't want the deck marked as modified, but we don't want to