1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-12-23 02:58:00 +01:00

Do not broadcast events for empty collections. SMACK-106

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@3033 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Gaston Dombiak 2005-11-04 19:51:29 +00:00 committed by gato
parent e5ea043798
commit 254c4a450a

View file

@ -565,9 +565,15 @@ public class Roster {
rosterListeners.toArray(listeners);
}
for (int i=0; i<listeners.length; i++) {
listeners[i].entriesAdded(addedEntries);
listeners[i].entriesUpdated(updatedEntries);
listeners[i].entriesDeleted(deletedEntries);
if (!addedEntries.isEmpty()) {
listeners[i].entriesAdded(addedEntries);
}
if (!updatedEntries.isEmpty()) {
listeners[i].entriesUpdated(updatedEntries);
}
if (!deletedEntries.isEmpty()) {
listeners[i].entriesDeleted(deletedEntries);
}
}
}