This successfully works around the problem mentioned in #528, but perhaps does not solve their underlying causes.
For whatever reason it looks like a single click on a BSToggle resulted in two calls to ShowActionsAsync (and the same on hiding), and that consequently two calls to AddDocumentEventAsync were made without unregistering in between, which appeared to get the event registration "stuck on" (even though more than two calls to remove it also happened, it was not actually removed).
This change doesn't prevent the multiple calls from happening, but it does ignore the second one.
This successfully works around the problem mentioned in #528, but perhaps does not solve their underlying causes.
For whatever reason it looks like a single click on a BSToggle resulted in two calls to ShowActionsAsync (and the same on hiding), and that consequently two calls to
AddDocumentEventAsync
were made without unregistering in between, which appeared to get the event registration "stuck on" (even though more than two calls to remove it also happened, it was not actually removed).This change doesn't prevent the multiple calls from happening, but it does ignore the second one.