* Show text on occlusion cards regardless of `occludeInactive`.
Before this change, on an image occlusion card, a text box was visible
during editing but not visible during review. This change makes text
visible even if other shapes would be hidden.
* Move fix to render_image_occlusion()
---------
Co-authored-by: jariji <jariji>
Co-authored-by: Abdo <abdo@abdnh.net>
Use OriginalStockKind instead of StockKind when setting
original_stock_kind for basic notetype variants. The two enums
have different numeric values, causing 'Restore to Default' to
restore the wrong template.
For example, StockKind::BasicTyping has value 3, but when read
back as OriginalStockKind, value 3 corresponds to
BasicOptionalReversed instead of BasicTyping (which is 4).
This fixes the off-by-one behavior where:
- Basic (type in the answer) → Basic (optional reversed card)
- Basic (and reversed card) → Basic (optional reversed card)
- Basic (optional reversed card) → Basic (and reversed card)
Fixes#4353
* add anki_i18n and locale_config crates to launcher
* add launcher.ftl
* add tr to state
* replace most hardcoded strings with translations
* add support for `launcher` rustcfg to trim translations
* use marker structs to denote type of translations
* move underscores into generated code
* Update cargo-license, which may fix the license order issue (dae)
* Fix/Ensure fuzz doesn't go backward during rescheduling
Fixes https://github.com/ankitects/anki/issues/2694
* Fix
* Get previous_interval from LastRevlogInfo
* Fix
* Format
* Format
* Exclude lapses
* Force reconfigure in CI
The cached build.ninja may reference files that don't exist in the PR.
On a local build this tends to auto-fix itself as the build scripts detect
a quick failure and re-run the configure, but CI tends to be too slow.
https://github.com/ankitects/anki/pull/4364#issuecomment-3338026129
* Rename min/max to make it clear they restrict interval, not fuzz
* Wording tweaks/comments for clarity
---------
Co-authored-by: Damien Elmes <gpg@ankiweb.net>
* Export last_interval to Python
* Add last_interval field to StatsRevlogEntry
* Implement last_interval_secs function
* Update last_interval field type in stats.proto
* Update last_interval to use last_interval_secs
* Fix/first and latest review dates should only only consider entries with a rating.
* Update rslib/src/stats/card.rs
Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>
---------
Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>
* Refactor reviews_for_fsrs function for improved performance
Replaced the previous implementation with a more efficient approach using a single loop and pre-allocated vectors. This change reduces the complexity of creating FSRSItems and enhances overall performance, especially for larger datasets.
* collapse `if` statement
* When not training, only create the final FSRS item
* add GetCustomColours rpc method
* save colours as rgb instead of argb
* show saved custom colours as possible options in colour picker
this is primarily for mobile clients, as qt currently ignores this
* save custom colours on colour picker change (for desktop)
* Enable nc: to only search in a specific field
* Add FieldSearchMode enum to replace boolean fields
* Avoid magic numbers in enum
* Use standard naming so Prost can remove redundant text
---------
Co-authored-by: Damien Elmes <gpg@ankiweb.net>
* Increase randomness in random sorting of new cards
Currently, the new cards appear roughly in the same order on consecutive days (if they are skipped by burying). This change aims to increase randomness by spreading out the salt across the hash space.
* Fix errors
* Make simulator fill missing values of DR and decay too
If a card has missing memory states, it will likely have missing DR and decay too. So, it makes sense to simultaneously update them as well.
* Fix error
* Avoid causing sync conflicts when filling in missing memory in sim
https://github.com/ankitects/anki/pull/4269#issuecomment-3201450124
---------
Co-authored-by: Damien Elmes <gpg@ankiweb.net>
* 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>
* Feat/use current_retrievability_seconds in SQL
* replace `days_since_last_review` with `seconds_since_last_review`
* Update is_due_in_days logic to include original or current due date check