-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Don't recalculate remaining steps, conditionally #3849
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Bug report reproduction steps: Create a new profile so that everything is set to default. Create a new card. Click Good. Open deck options and empty learning steps. Save. No go back and put 1m 10m as LS. Go back to the card and it should show 10m on the Good button. Check if old_steps is empty and if it is just use remaining steps for the new_remaining steps. Add test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for digging into this Thomas! Just a minor style issue, and a conflict on the CONTRIBUTORS file to resolve and then I can merge it in.
rslib/src/card/mod.rs
Outdated
@@ -490,6 +496,9 @@ impl From<MemoryState> for FsrsMemoryState { | |||
|
|||
#[cfg(test)] | |||
mod test { | |||
use crate::prelude::AnkiError; | |||
use crate::prelude::Collection; | |||
use crate::prelude::DeckId; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's more idiomatic to import crate::prelude::*
and/or super::*
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, thank you!
Fixed and ready for merge! Thank you! |
Thank you too! |
This PR fixes a bug reported on the forums.
Steps to reproduce the bug.
Changes
Add a condition to check if
old_steps
is empty and if it is use theremaining
steps as thenew_remaining
steps. Add a test.Evidence
skipped-learning-steps-fix.mov
close #3699