1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2025-09-10 18:59:41 +02:00

Wait for server response before returning roster.

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@1867 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Matt Tucker 2003-04-07 05:40:28 +00:00 committed by mtucker
parent d77787f67c
commit af4ea681ee
4 changed files with 42 additions and 11 deletions

View file

@ -55,11 +55,10 @@ public class RosterEntry {
* @return an iterator for the groups this entry belongs to.
*/
public Iterator getGroups() {
Roster roster = connection.getRoster();
List results = new ArrayList();
// Loop through all roster groups and find the ones that contain this
// entry. This algorithm should be fine
for (Iterator i=roster.getGroups(); i.hasNext(); ) {
for (Iterator i=connection.roster.getGroups(); i.hasNext(); ) {
RosterGroup group = (RosterGroup)i.next();
if (group.contains(this)) {
results.add(group);