mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-10 17:49:38 +02:00
SMACK-305: fixed roster reload
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@11670 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
446a601b73
commit
31cd0ab088
2 changed files with 6 additions and 4 deletions
|
@ -37,7 +37,8 @@ public class RosterEntry {
|
|||
private String name;
|
||||
private RosterPacket.ItemType type;
|
||||
private RosterPacket.ItemStatus status;
|
||||
private Connection connection;
|
||||
final private Roster roster;
|
||||
final private Connection connection;
|
||||
|
||||
/**
|
||||
* Creates a new roster entry.
|
||||
|
@ -49,11 +50,12 @@ public class RosterEntry {
|
|||
* @param connection a connection to the XMPP server.
|
||||
*/
|
||||
RosterEntry(String user, String name, RosterPacket.ItemType type,
|
||||
RosterPacket.ItemStatus status, Connection connection) {
|
||||
RosterPacket.ItemStatus status, Roster roster, Connection connection) {
|
||||
this.user = user;
|
||||
this.name = name;
|
||||
this.type = type;
|
||||
this.status = status;
|
||||
this.roster = roster;
|
||||
this.connection = connection;
|
||||
}
|
||||
|
||||
|
@ -114,7 +116,7 @@ public class RosterEntry {
|
|||
List<RosterGroup> results = new ArrayList<RosterGroup>();
|
||||
// Loop through all roster groups and find the ones that contain this
|
||||
// entry. This algorithm should be fine
|
||||
for (RosterGroup group: connection.getRoster().getGroups()) {
|
||||
for (RosterGroup group: roster.getGroups()) {
|
||||
if (group.contains(this)) {
|
||||
results.add(group);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue