Anki/rslib/src/storage
Jarrett Ye 62e01fe03a
Fix Cards with Missing Last Review Time During Database Check (#4237)
* Fix Cards with Missing Last Review Time During Database Check

* clippy

* Apply suggestions from code review

Co-authored-by: Luc Mcgrady <lucmcgrady@gmail.com>

* Apply suggestions from code review

Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>

* Add is_reset method to RevlogEntry and update scheduling logic

This commit introduces the `is_reset` method to the `RevlogEntry` struct, which identifies entries representing reset operations. Additionally, the scheduling logic in `memory_state.rs` and `params.rs` has been updated to utilize this new method, ensuring that reset entries are handled correctly during review scheduling.

* Implement is_cramming method in RevlogEntry and update scheduling logic

This commit adds the `is_cramming` method to the `RevlogEntry` struct, which identifies entries representing cramming operations. The scheduling logic in `params.rs` has been updated to utilize this new method, improving the clarity and maintainability of the code.

* Refactor rating logic in RevlogEntry and update related scheduling functions

This commit introduces a new `has_rating` method in the `RevlogEntry` struct to encapsulate the logic for checking if an entry has a rating. The scheduling logic in `params.rs` and the calculation of normal answer counts in `card.rs` have been updated to use this new method, enhancing code clarity and maintainability.

* update revlog test helper function to assign button_chosen correctly

* Refactor card property fixing logic to use CardFixStats struct

* Add one-way sync trigger for last review time updates in dbcheck

* Update documentation for is_reset method in RevlogEntry to clarify ease_factor condition

* Apply suggestions from code review

Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>

* Minor wording tweak

---------

Co-authored-by: Luc Mcgrady <lucmcgrady@gmail.com>
Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>
2025-08-06 19:49:30 +10:00
..
card Fix Cards with Missing Last Review Time During Database Check (#4237) 2025-08-06 19:49:30 +10:00
config Switch Rust import style (#2330) 2023-01-18 21:39:55 +10:00
dbcheck Improve performance of invalid ID fix in DB check 2023-07-07 22:53:41 +10:00
deck Update to Rust 1.88 2025-06-29 11:50:49 +07:00
deckconfig Update to Rust 1.88 2025-06-29 11:50:49 +07:00
graves Switch Rust import style (#2330) 2023-01-18 21:39:55 +10:00
note Update to Rust 1.85 2025-02-21 10:42:42 +07:00
notetype Update to Rust 1.88 2025-06-29 11:50:49 +07:00
revlog Include reset entries in dataset exported for research (#3998) 2025-05-15 16:31:18 +10:00
tag Expose some collection methods already public in rslib backend (#2510) 2023-05-22 13:44:18 +10:00
upgrades Split io.rs into separate crate, and use it in proto build 2023-06-12 15:47:51 +10:00
collection_timestamps.rs Switch Rust import style (#2330) 2023-01-18 21:39:55 +10:00
mod.rs Add search keyword to strip clozes beforehand (#4145) 2025-07-01 16:35:21 +07:00
schema11.sql Add comment explaining why sfld column has type integer 2021-01-25 18:39:59 +08:00
sqlite.rs Fix/use current_retrievability_seconds in SQL to keep consistent with card info (#4231) 2025-07-28 19:06:20 +10:00
sync.rs Update to Rust 1.88 2025-06-29 11:50:49 +07:00
sync_check.rs Update to Rust 1.88 2025-06-29 11:50:49 +07:00