mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-12-01 18:52:08 +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.
|
// Mark the entry as unfiled if it does not belong to any groups.
|
||||||
if (item.getGroupNames().isEmpty()) {
|
if (item.getGroupNames().isEmpty()) {
|
||||||
if (!unfiledEntries.contains(entry)) {
|
unfiledEntries.remove(entry);
|
||||||
unfiledEntries.add(entry);
|
unfiledEntries.add(entry);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
unfiledEntries.remove(entry);
|
unfiledEntries.remove(entry);
|
||||||
|
|
Loading…
Reference in a new issue