[Anki 24.04.2] Custom scheduling code does not work when studying filtered decks (?)

Windows 10, Anki 24.04.2 beta1 qt6. Also reproduced on 23.12.1.
No add-ons.

I am using the following as my “Custom scheduling” code. Basically, if a card’s ease is different from 230, every time I grade the card as “Good”, a value of 5 will be added/subtracted to move the ease closer to 230.
For the most part, the code appears to work fine. However, it does not seem to function when studying cards in filtered decks (rescheduling enabled).

if ( 
  states.good.normal && 
  states.good.normal.review && 
  states.current.normal.review 
) { 
  let oldEase = states.good.normal.review.easeFactor; 
  let diff = 2.30 - oldEase; 
  states.good.normal.review.easeFactor += 
    Math.sign(diff) * Math.min(0.05, Math.abs(diff)); 
}

Here is my code snippet to check review state (including in filtered deck):

3 Likes

It seems to work great! Thanks :slight_smile:

2 Likes