Only send api request if the popup is opening
Only send api request if the popup is opening

Listen to 'toggle' instead of onAction so we can only send api
requests for notifications if the popup is in the process of opening
and not when the button is clicked to close the popup.

Bug: T111667
Change-Id: I39aea942ff5a87a13043cccdb696ef8952ca61db

wikimedia/mediawiki-extensions-Echo,wikimedia/mediawiki-extensions-Echo,wikimedia/mediawiki-extensions-Echo,wikimedia/mediawiki-extensions-Echo