Supply deck ID in hook, so that add-ons may update deck config dict
(for newly created filtered decks where the deck ID is not yet set in the FilteredDeckForUpdate object)
This commit is contained in:
parent
e9b18c14f2
commit
feaa32b751
@ -303,7 +303,9 @@ class FilteredDeckConfigDialog(QDialog):
|
|||||||
return
|
return
|
||||||
|
|
||||||
def success(out: OpChangesWithID) -> None:
|
def success(out: OpChangesWithID) -> None:
|
||||||
gui_hooks.filtered_deck_dialog_did_add_or_update_deck(self, self.deck)
|
gui_hooks.filtered_deck_dialog_did_add_or_update_deck(
|
||||||
|
self, self.deck, out.id
|
||||||
|
)
|
||||||
saveGeom(self, self.GEOMETRY_KEY)
|
saveGeom(self, self.GEOMETRY_KEY)
|
||||||
aqt.dialogs.markClosed(self.DIALOG_KEY)
|
aqt.dialogs.markClosed(self.DIALOG_KEY)
|
||||||
QDialog.accept(self)
|
QDialog.accept(self)
|
||||||
|
@ -307,6 +307,7 @@ hooks = [
|
|||||||
args=[
|
args=[
|
||||||
"filtered_deck_dialog: aqt.filtered_deck.FilteredDeckConfigDialog",
|
"filtered_deck_dialog: aqt.filtered_deck.FilteredDeckConfigDialog",
|
||||||
"filtered_deck: anki.scheduler.FilteredDeckForUpdate",
|
"filtered_deck: anki.scheduler.FilteredDeckForUpdate",
|
||||||
|
"deck_id: int",
|
||||||
],
|
],
|
||||||
doc="Allows performing changes after a filtered deck has been added or updated",
|
doc="Allows performing changes after a filtered deck has been added or updated",
|
||||||
),
|
),
|
||||||
|
Loading…
Reference in New Issue
Block a user