Right now, we have a few events in the RosterModule for item change (Added, Updated, Removed). However, at the startup time, in GUI it is inefficient to deal individual roster items and updated GUI for each element.
It would be very useful to have a single event handler called once, the entire roster is loaded. Then, in the GUI I can load all roster items and display up to date list.
Unknown commented 4 years ago
Implemented.
Unknown commented 4 years ago
Ok, thank you for quick response.
I haven't tried the new event yet but I noticed that now, there is no event fired for individual roster items when they are being added. I think this old call is still useful and worth having it. So I do not want to remove the ItemAdded event. It's good to have both event called.
Unknown commented 4 years ago
I checked Halcyon logs and it looks like actually, the event for individual roster items added is called before RosterLoadedEvent and this is what I wanted and what expected. For some reasons, however, the event is not calling my handler. I will be investigating it further tomorrow.
However, the RosterLoadedEvent is called 2 times at the app startup time and looking into Halcyon logs, it seems that the library requests roster twice, hence receives roster twice and then calls RosterLoadedEvent 2 times.
It seems like the double roster requesting is redundant here and should be avoided.
The logs shows 2 distinct roster get requests with different stanza IDs and then the app receives 2 roster responses.
Right now, we have a few events in the
RosterModule
for item change (Added, Updated, Removed). However, at the startup time, in GUI it is inefficient to deal individual roster items and updated GUI for each element.It would be very useful to have a single event handler called once, the entire roster is loaded. Then, in the GUI I can load all roster items and display up to date list.