use of com.xabber.android.presentation.ui.contactlist.viewobjects.AccountWithGroupsVO in project xabber-android by redsolution.
the class ContactListPresenter method createContactListWithAccountsAndGroups.
private void createContactListWithAccountsAndGroups(List<IFlexible> items, AccountConfiguration rosterAccount, boolean showEmptyGroups, Comparator<AbstractContact> comparator) {
AccountWithGroupsVO account = AccountWithGroupsVO.convert(rosterAccount, this);
boolean firstGroupInAccount = true;
for (GroupConfiguration rosterConfiguration : rosterAccount.getSortedGroupConfigurations()) {
if (showEmptyGroups || !rosterConfiguration.isEmpty()) {
GroupVO group = GroupVO.convert(rosterConfiguration, firstGroupInAccount, this);
firstGroupInAccount = false;
rosterConfiguration.sortAbstractContacts(comparator);
for (AbstractContact contact : rosterConfiguration.getAbstractContacts()) {
group.addSubItem(SettingsManager.contactsShowMessages() ? ExtContactVO.convert(contact, this) : ContactVO.convert(contact, this));
}
account.addSubItem(group);
}
}
items.add(account);
}
Aggregations