Skip to content

Commit

Permalink
fallback on default deck in congrats screen
Browse files Browse the repository at this point in the history
  • Loading branch information
dae committed Aug 4, 2021
1 parent 57f3d30 commit 94913ec
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions rslib/src/scheduler/congrats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ pub(crate) struct CongratsInfo {

impl Collection {
pub fn congrats_info(&mut self) -> Result<pb::CongratsInfoResponse> {
let did = self.get_current_deck_id();
let deck = self.get_deck(did)?.ok_or(AnkiError::NotFound)?;
let deck = self.get_current_deck()?;
let today = self.timing_today()?.days_elapsed;
let info = self.storage.congrats_info(&deck, today)?;
let is_filtered_deck = deck.is_filtered();
Expand Down

0 comments on commit 94913ec

Please sign in to comment.