upta/pubsub

unsubscribe not working the way I'm expecting

PandaWood opened this issue · 0 comments

I'm subscribing in the constructor of a view, since many instances are closed and reopened, I thought unsubscribing first would work, but it doesn't.
Passing this doesn't work, but I thought that made sense, since the View I'm calling this from is a different instance. But I'm expecting the call without this to unsubscribe all.
Can anyone explain what I'm missing?

Hub.Default.Unsubscribe<RequestEmailEvent>();   // this is not unsubscribing from anything the next line creates, so I get compounding/multiple events, confused why
Hub.Default.Subscribe<RequestEmailEvent>(this, this.OnRequestEmail);