Trigger onReady callback on resubscribe #8754
I guess we might need a short discussion about if we want to keep the current behaviour and document that you can use
However I do think this should be classified as a bug and fixed because there are more people that assume that this function would work the way it would with this PR applied.
So maybe a warning in
On another note, do we have any way of achieving what the developers in that comment were doing if we apply this patch?
Question: Why, in the case the existing subscription is not yet ready, is the ready callback overwritten instead of added? I mean the code has this comment:
But this doesn't really make sense if you think about a component-based GUI, since the onReady callback will often be used to for example hide a loading indicator.
So that means if you have 2 different components subscribing to the same thing more or less at the same time, and both use the 'onReady' callback to hide a loading indicator inside the component, only one will be called and thus one component will keep showing the loading indicator?
@sebakerckhof, even if 2 components were to subscribe to the same publication there would still be 2 separate subscription instances with their own
I believe this might be more related to conditionally calling