mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Avoid causing sync conflicts when filling in missing memory in sim
https://github.com/ankitects/anki/pull/4269#issuecomment-3201450124
This commit is contained in:
parent
5b7dfae70a
commit
978e0025e2
1 changed files with 1 additions and 2 deletions
|
@ -142,12 +142,11 @@ impl Collection {
|
||||||
// calculate any missing memory state
|
// calculate any missing memory state
|
||||||
for c in &mut cards {
|
for c in &mut cards {
|
||||||
if is_included_card(c) && c.memory_state.is_none() {
|
if is_included_card(c) && c.memory_state.is_none() {
|
||||||
let original = c.clone();
|
|
||||||
let fsrs_data = self.compute_memory_state(c.id)?;
|
let fsrs_data = self.compute_memory_state(c.id)?;
|
||||||
c.memory_state = fsrs_data.state.map(Into::into);
|
c.memory_state = fsrs_data.state.map(Into::into);
|
||||||
c.desired_retention = Some(fsrs_data.desired_retention);
|
c.desired_retention = Some(fsrs_data.desired_retention);
|
||||||
c.decay = Some(fsrs_data.decay);
|
c.decay = Some(fsrs_data.decay);
|
||||||
self.update_card_inner(c, original, self.usn()?)?;
|
self.storage.update_card(c)?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let days_elapsed = self.timing_today().unwrap().days_elapsed as i32;
|
let days_elapsed = self.timing_today().unwrap().days_elapsed as i32;
|
||||||
|
|
Loading…
Reference in a new issue