hgiesel / anki_straight_reward

Escape Ease Hell!
https://ankiweb.net/shared/info/957961234
22 stars 4 forks source link

Fix #1: Apply ease changes at the end of sync #5

Closed bmulholland closed 4 years ago

bmulholland commented 4 years ago

Fix #1

Note that I did a small stylist change as the first commit. Check the second commit directly to get a cleaner change. And feel free to ask me to split up the changes or remove the first one.

bmulholland commented 4 years ago

@hgiesel This fix appears to work, in the sense that:

  1. There's no errors
  2. It applies ease changes to some cards (unverified: all cards that should, unverified: correct ease change)
  3. The bug I encountered didn't happen for any cards today (sample size ~300, unverified: never happens)
bmulholland commented 4 years ago

Update: Sync'd 547 reviews from mobile today and the bug did not occur. At this point I think it's fair to say the fix works.

I was worried that the changes might only apply on a subset of cards; there were enough ease changes today that it seems likely that all cards updated as expected. Subjective, not objective, though.

I haven't checked any cards to verify the ease updated exactly as expected because it's hard to look up cards by ID. Do you have any tricks for that?

hgiesel commented 4 years ago

You can look up cards in the browser via "cid:123456789", besides that, you can consult collection.log. I used those two ways.

Besides that, the changes look good to me. We probably could have used the the anki provided hook for the second part of the merging, but I agree that we might also wait, until we can do it entirely with one hook (Ill open an issue for this).

I'll merge it with some minor formatting changes, and test it myself.