private void clearSelectionList(ContactItem selectedItem) { // Check for null. In certain cases the event triggering the model might // not find the selected object. if (selectedItem == null) { return; } final ContactGroup owner = getContactGroup(selectedItem.getGroupName()); for (ContactGroup contactGroup : new ArrayList<>( groupList )) { if (owner != contactGroup) { contactGroup.clearSelection(); } } }
contactGroup.clearSelection(); for (ContactItem contactItem : contactGroup.getContactItems()) { if (!contactMap.containsKey(contactItem.getJID())) {
private void startConference(Collection<ContactItem> items) { final ContactList contactList = SparkManager.getWorkspace().getContactList(); List<Jid> jids = new ArrayList<>(); for (ContactItem item : items) { ContactGroup contactGroup = contactList.getContactGroup(item.getGroupName()); contactGroup.clearSelection(); if (item.isAvailable()) { jids.add(item.getJid()); } } Localpart userName = SparkManager.getSessionManager().getJID().getLocalpart(); final EntityBareJid roomName = JidCreate.entityBareFromOrThrowUnchecked(userName + "_" + StringUtils.randomString(3)); DomainBareJid serviceName = getDefaultServiceName(); if (serviceName != null) { ConferenceUtils.inviteUsersToRoom(serviceName, roomName, jids, true); } }
contactGroup.addContactItem(newContact); contactGroup.clearSelection();
contactGroup.addContactItem(newContact); contactGroup.clearSelection();