At times we just need to notify other view or viewmodel that something is done and there is no need to pass a payload. So I think it would be a good idea to have a PubSubEvent without a payload
My vote is up for this. Your point is absolutely correct.
Personally I can't remember really needing a PubSubEvent without payload. I usually pass at least the Id of the object the event is used for (e.g. DownloadCompleted for request 9). Events without a payload are usually UI events and those I always handle with behaviors.
Let's see what the rest of the team thinks about it.
I'll have to think about this. I also have never published an event without a payload (that I can remember). I'm not sure I'll put any effort into this anytime soon.
We publish events with bool because we have to. It would be nice to not have to pass a payload. These are not only used for UI events. For example, a Refresh event is published that needs to go across ViewModels. I don't care about any particular payload.
The amount of code churn that must be done in order to implement this may not be worth the time and effort.
I'll have the PR done shortly.
Even better :)
Thanks webwarrior06 and especially allanrsmith for submitting the PR.
And as always Thanks Brian for your outstanding support.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
We publish events with
boolbecause we have to. It would be nice to not have to pass a payload. These are not only used for UI events. For example, aRefreshevent is published that needs to go across ViewModels. I don't care about any particular payload.