Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unsubscribe not working the way I'm expecting #45

Open
PandaWood opened this issue Mar 4, 2023 · 0 comments
Open

unsubscribe not working the way I'm expecting #45

PandaWood opened this issue Mar 4, 2023 · 0 comments

Comments

@PandaWood
Copy link

PandaWood commented Mar 4, 2023

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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant