for (Group group: getSharedGroups()) {
int groupSize = item.getSharedGroups().size() + item.getInvisibleSharedGroups().size(); if (item.isOnlyShared() && groupSize == 1) { if (!item.getSharedGroups().contains(sharedGroup) && !item.getInvisibleSharedGroups().contains(sharedGroup)) { return; GroupManager.getInstance().getGroups(getUserJID()); Collection<Group> sharedGroups = new ArrayList<>(); sharedGroups.addAll(item.getSharedGroups()); sharedGroups)) { item.setSubStatus(RosterItem.SUB_BOTH); } else if (item.getSharedGroups().isEmpty() && !item.getInvisibleSharedGroups().isEmpty()) { item.setSubStatus(RosterItem.SUB_FROM);
getUsername()); for (Group sharedGroup : item.getSharedGroups()) { String displayName = sharedGroup.getProperties().get("sharedRoster.displayName"); if (displayName != null) {
for (Group sharedGroup : item.getSharedGroups()) { String displayName = sharedGroup.getProperties().get("sharedRoster.displayName"); if (displayName != null) {
if (item.getSharedGroups().contains(group)) { return; sharedGroups.addAll(item.getSharedGroups());
int groupSize = item.getSharedGroups().size() + item.getInvisibleSharedGroups().size(); if (item.isOnlyShared() && groupSize == 1 &&
if (doChecking && itemToRemove != null && !itemToRemove.getSharedGroups().isEmpty()) { throw new SharedGroupException("Cannot remove contact that belongs to a shared group");
for (Group group: getSharedGroups()) {
int groupSize = item.getSharedGroups().size() + item.getInvisibleSharedGroups().size(); if (item.isOnlyShared() && groupSize == 1) { if (!item.getSharedGroups().contains(sharedGroup) && !item.getInvisibleSharedGroups().contains(sharedGroup)) { return; GroupManager.getInstance().getGroups(getUserJID()); Collection<Group> sharedGroups = new ArrayList<>(); sharedGroups.addAll(item.getSharedGroups()); sharedGroups)) { item.setSubStatus(RosterItem.SUB_BOTH); } else if (item.getSharedGroups().isEmpty() && !item.getInvisibleSharedGroups().isEmpty()) { item.setSubStatus(RosterItem.SUB_FROM);
getUsername()); for (Group sharedGroup : item.getSharedGroups()) { String displayName = sharedGroup.getProperties().get("sharedRoster.displayName"); if (displayName != null) {
for (Group sharedGroup : item.getSharedGroups()) { String displayName = sharedGroup.getProperties().get("sharedRoster.displayName"); if (displayName != null) {
if (item.getSharedGroups().contains(group)) { return; sharedGroups.addAll(item.getSharedGroups());
int groupSize = item.getSharedGroups().size() + item.getInvisibleSharedGroups().size(); if (item.isOnlyShared() && groupSize == 1 &&
if (doChecking && itemToRemove != null && !itemToRemove.getSharedGroups().isEmpty()) { throw new SharedGroupException("Cannot remove contact that belongs to a shared group");