mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-10 09:39:39 +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:
parent
d77787f67c
commit
af4ea681ee
4 changed files with 42 additions and 11 deletions
|
@ -131,10 +131,10 @@ public class RosterGroup {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns true if an entry is part of the group.
|
||||
* Returns true if an entry is part of this group.
|
||||
*
|
||||
* @param entry
|
||||
* @return
|
||||
* @param entry a roster entry.
|
||||
* @return true if the entry is part of this group.
|
||||
*/
|
||||
public boolean contains(RosterEntry entry) {
|
||||
synchronized (entries) {
|
||||
|
@ -142,6 +142,11 @@ public class RosterGroup {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a roster entry to this group.
|
||||
*
|
||||
* @param entry a roster entry.
|
||||
*/
|
||||
public void addEntry(RosterEntry entry) {
|
||||
// Only add the entry if it isn't already in the list.
|
||||
synchronized (entries) {
|
||||
|
@ -155,6 +160,11 @@ public class RosterGroup {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a roster entry from this group.
|
||||
*
|
||||
* @param entry a roster entry.
|
||||
*/
|
||||
public void removeEntry(RosterEntry entry) {
|
||||
// Only remove the entry if it's in the entry list.
|
||||
synchronized (entries) {
|
||||
|
@ -184,4 +194,4 @@ public class RosterGroup {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue