ThoreBor / Anki_Leaderboard

Anki 2.1 Add-On
https://ankiweb.net/shared/info/41708974
MIT License
52 stars 11 forks source link

fix: changed source of night mode #177

Closed rodrigolanes closed 2 years ago

rodrigolanes commented 2 years ago

Fixes #176 I'm not familiar with Anki's development, even so I studied the code and made the following adaptation:

old:

try:
    nightmode = mw.pm.night_mode()
except:
    nightmode = False

new:

from aqt.theme import theme_manager

try:
    nightmode = theme_manager.night_mode
except:
    nightmode = False
ThoreBor commented 2 years ago

Thanks! I'll have to check if this works on older versions as well, though