Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Beautify Anki in latest Anki version (2.1.49) #59

Merged
merged 3 commits into from
Jan 16, 2022

Conversation

fylux
Copy link
Contributor

@fylux fylux commented Dec 26, 2021

I have tried fix the add-on by simply spotting what part of the code was crashing and fixing it accordingly. I could trigger 3 different crashes and they were fixed in the following ways:

  • self.bottom.web.setFocus() was producing inifinite recursion. Use self.mw.web.setFocus() instead.
  • self._nextDueMsg() and self.next_learn_msg() have been deprecated after the TS + Rust rewrite (ankitects/anki@e568525)
  • Apparently now webview.css and deckbrowser.css are in the css/ folder

Overall, these are very hacky fixes because in ankitects/anki@e568525 most of the logic that this add-on uses was rewritten so to fix the add-on further a complete rewrite would be required. It might be that there are more crashes which this fix does not cover since I was the only tester.

Tested locally on Windows 10, Anki 2.1.49.

PS: Thanks to @datphan310 for the reviewer.py fix. Before I was just naively commenting the code.

- self.typeCorrect was producing an infinite recursion
- self._nextDueMsg() and self.next_learn_msg() have been deprecated after the TS + Rust rewrite (ankitects/anki@e568525)
- Apparent now webview.css and deckbrowser.css are in the css/ folder
Based on datphan310 proposal to fix reviewer.py ShoroukAziz#58
I tested it locally and it works
@ShoroukAziz ShoroukAziz merged commit 4bed9a1 into ShoroukAziz:master Jan 16, 2022
@ShoroukAziz
Copy link
Owner

Thanks a lot @fylux For your contribution. That seems to fix it for now.

@fylux
Copy link
Contributor Author

fylux commented Jan 17, 2022

Thank you very much for the review! Please don't forget to generate a new github release including this patch.

@ShoroukAziz
Copy link
Owner

Done already. Thanks Again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants