Hi,
I’'ve written some code which wraps a Roster object to provide a UI model. My wrapper implements RosterListener, and must rebuild the internal state whenever rosterModified() is called.
My problem is that when I delete an entry using removeEntry(RosterEntry), I see two calls to rosterModified(). In the first call, the RosterEntry is not in the Roster (according to getEntries()). But by the second call, the RosterEntry has come back!. If I call getEntries() a third time, the entry has (finally) disappeared.
I’‘m not trying to do anything clever here, it’'s one, single threaded, client connecting to a jabberd server.
I’'m using Smack 1.4.0, but 1.3.0 behaves the same.
Is this as intended? I’'m suprised to get TWO callbacks to the RosterListener. The debugger shows this sequence of packets:
SENT
<item jid="user@server.com" name="user" subscription="remove">
General
RECEIVED
<item jid="user@server.com" name="user" subscription="remove">
General
RECEIVED
RECEIVED
<item jid="user@server.com" name="user" subscription="none">
General
Any ideas as to what I can do to keep my roster model in sync?
Many thanks,
Jon.