Skip to content

Commit

Permalink
Clear memory states during bulk action if item is None
Browse files Browse the repository at this point in the history
  • Loading branch information
user1823 authored Jan 11, 2025
1 parent 6966da1 commit ab2b415
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rslib/src/scheduler/fsrs/memory_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ impl Collection {
progress.update(true, |state| state.current_cards = idx as u32 + 1)?;
let mut card = self.storage.get_card(card_id)?.or_not_found(card_id)?;
let original = card.clone();
if let Some(req) = &req {
if let (Some(req), Some(item)) = (&req, item) {
card.set_memory_state(&fsrs, item, historical_retention.unwrap())?;
card.desired_retention = desired_retention;
// if rescheduling
Expand Down

0 comments on commit ab2b415

Please sign in to comment.