mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-25 21:42:07 +01:00
Fix unfiledEntries not updating
If an roster push with a roster entry without any group is processed, then the entry is not updated, because unfiledEntries.contains(entry) would return true, as the RosterEntry.equals() method only compares the name. We simply fix it by always removing the entry first and then adding it again. Thanks to Christian Schudt for pointing this out. SMACK-559
This commit is contained in:
parent
10e82fae45
commit
fd532be9b6
1 changed files with 2 additions and 3 deletions
|
@ -702,9 +702,8 @@ public class Roster {
|
|||
|
||||
// Mark the entry as unfiled if it does not belong to any groups.
|
||||
if (item.getGroupNames().isEmpty()) {
|
||||
if (!unfiledEntries.contains(entry)) {
|
||||
unfiledEntries.add(entry);
|
||||
}
|
||||
unfiledEntries.remove(entry);
|
||||
unfiledEntries.add(entry);
|
||||
}
|
||||
else {
|
||||
unfiledEntries.remove(entry);
|
||||
|
|
Loading…
Reference in a new issue