Yutsuten / anki-lifedrain

Anki add-on that adds a life bar to anki while reviewing.
https://ankiweb.net/shared/info/715575551
GNU Affero General Public License v3.0
23 stars 2 forks source link

Fix crash on anki v23.10 #168

Closed Yutsuten closed 1 year ago

Yutsuten commented 1 year ago

Fixes #167

review_did_undo hook was removed in v23.10.

23.10beta6 changelog

Remove legacy v1/v2 code by abdnh in https://github.com/ankitects/anki/pull/2727. This may also cause errors in some add-ons if they were referencing hooks that only applied to v1/v2.

Yutsuten commented 1 year ago

Hopefully the ruff fixes won't break things to people. Tested in a Linux environment and working.

edr1412 commented 1 year ago

Can you upload this version to AnkiWeb? Thanks!

Yutsuten commented 1 year ago

Actually, I planned to do that already. But I can't.

See: Cannot update my own add-on

Edit: Seems that they fixed it. I'll upload soon.

edr1412 commented 1 year ago

Hi, with v2.7.2 I find an error occurring frequently when I select a deck (after I do some review, and then quit to the main decks view). I also noticed that someone encountered this too, and he left a review on https://ankiweb.net/shared/info/715575551 . And I have the same Debug Info as his.

Yutsuten commented 1 year ago

@edr1412 Thanks for reporting the bug. Just to be sure, could you share your debug info too? I want to see what is common for you two, because I don't see the error.

Also, a more descriptive way to reproduce the bug is welcome. How do you change between screens? Shortcut? Mouse? What are the exact steps so I can make the same here?

Yutsuten commented 1 year ago

Oohhh I see, there is a specific flow needed to trigger the bug.

  1. Answer the card
  2. Press D and return to deck selection
  3. Press S to select a deck and BOOM

Fixing here...