Skip to content

Commit

Permalink
fix: deck chooser causes error
Browse files Browse the repository at this point in the history
  • Loading branch information
hgiesel committed Jan 3, 2024
1 parent cb91654 commit 4e3d905
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,13 @@ def deck_change(id):
"before",
)
else:
aqt.deckchooser.DeckChooser.choose_deck = anki.hooks.wrap(
aqt.deckchooser.DeckChooser.choose_deck,
lambda deckchooser: deck_change(deckchooser.selected_deck_id),
"after",
)
save_func = aqt.deckchooser.DeckChooser.choose_deck

def on_deck_change(deckchooser):
save_func(deckchooser)
deck_change(deckchooser.selected_deck_id),

aqt.deckchooser.DeckChooser.choose_deck = on_deck_change

### MODEL CHANGE
def notetype_change(id):
Expand Down

0 comments on commit 4e3d905

Please sign in to comment.