Is this a bug? gui_hooks.style_did_init called before addon initialization

I’m very new to anki addon development, so please excuse me if I’m making some mistake. It seems that gui_hooks.style_did_init is run from inside theme.py before my addon is being initialized, meaning it’s impossible to actually hook into this call with an addon. Am I correct?

I’ve tested this with the latest version of Anki on Github.

It seems so.
gui_hooks.style_did_init() is eventually triggered by setupUI(), which is actually called before initializing add-ons.

Looks like we can’t easily defer the call to setupStyle(), as it causes a flash on startup. Maybe your add-on could call theme_manaer.apply_style() again on startup?