Hook triggered on making page visible?

I’m implementing a mail-alert function for users if a blog article has been published or changed.

kirby()->hook([‘panel.page.update’], function($page) {
// your hook code
if($page->template()==‘article’ && $page->isVisible()) {
// code for sending email here
}
}

This works nicely when the editor presses “save”. However, when the editor only makes page visible (via switch in the panel) and not pressing “save”, it seems to me that the hook ‘panel.page.update’ is not triggered. Is there another hook that triggers on making the page visible?

Thanks for hints
Matthias

You can find a list of hooks here: https://getkirby.com/docs/developer-guide/advanced/hooks

In your case, that would be the panel.page.sort hook, if a page is made visible.
Use panel.page.hide to react when the user makes a page invisible.

‘panel.page.sort’ makes sense, now.

Thank you, texnixe.