zZH2z
1
Hello,
is there any hook which will be initiated every time when user profile will be unloaded or Anki is being closed?
There seems to be:
Hook(name="profile_will_close", legacy_hook="unloadProfile")
but it is written:
Called before one-way syncs and colpkg imports/exports.
Source: anki/qt/tools/genhooks_gui.py at main · ankitects/anki · GitHub
but it is not triggers during the regular close of application.
1 Like
dae
2
You’re reading the docs for the wrong hook.
zZH2z
3
I know ;). I just wrote info about this hook so that someone wouldn’t give me it
without even reading it.
I have not tried it, maybe if you use gui_hooks.state_did_change
and if new_state == "profileManager"
it might work?
1 Like
zZH2z
6
Tested again and worked - thanks
system
Closed
7
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.