Fixes an issue where am-known-automatically was not being applied to new cards with all known morphemes in cases where the card contained at least one morpheme that was manually set as known or loaded from the known-morphs folder.
What is the current behavior?
Known morphs loaded from the known-morphs folder are being assigned a highest_learning_interval of am_config.recalc_interval_for_known (L372). However, this caused such morphs to be considered 'in learning' inside the function _get_card_score_and_unknowns_and_learning_status since it checks for intervals that are lower or equal that value (L734).
This resulted in a situation where new cards with all known morphs, where at least some of them were loaded from the known-morphs folder, were considered to have learning morphs in them, preventing the card from getting tagged with am-known-automatically even though all of its morphs were known.
What is the new behavior?
For the purpose of tagging a new card, morphs are now considered to be 'in learning' when their highest learning interval is strictly less than the "learning interval of known morphs" set in the configuration.
New cards containing only known morphs, regardless of how they got their 'known' status, will now be properly tagged with am-known-automatically.
What kind of changes does this PR introduce?
[x] Bug fix (non-breaking change which fixes an issue)
Checklist:
[x] My code successfully passes pre-commit
[x] I have commented my code, particularly in hard-to-understand areas
[x] I am willing to help create documentation/guides for the changes made in this PR
[x] This PR can be rebased onto main without conflicts (create a backup branch before attempting a rebase)
[x] I have squashed my commits into sensible portions
Fixes an issue where
am-known-automatically
was not being applied to new cards with all known morphemes in cases where the card contained at least one morpheme that was manually set as known or loaded from the known-morphs folder.What is the current behavior?
Known morphs loaded from the known-morphs folder are being assigned a
highest_learning_interval
ofam_config.recalc_interval_for_known
(L372). However, this caused such morphs to be considered 'in learning' inside the function_get_card_score_and_unknowns_and_learning_status
since it checks for intervals that are lower or equal that value (L734).This resulted in a situation where new cards with all known morphs, where at least some of them were loaded from the known-morphs folder, were considered to have learning morphs in them, preventing the card from getting tagged with
am-known-automatically
even though all of its morphs were known.What is the new behavior?
For the purpose of tagging a new card, morphs are now considered to be 'in learning' when their highest learning interval is strictly less than the "learning interval of known morphs" set in the configuration.
New cards containing only known morphs, regardless of how they got their 'known' status, will now be properly tagged with
am-known-automatically
.What kind of changes does this PR introduce?
Checklist: