Search in sources :

Example 1 with AbstractContact

use of com.xabber.android.data.roster.AbstractContact in project xabber-android by redsolution.

the class GroupEditor method update.

private void update() {
    AbstractContact abstractContact = RosterManager.getInstance().getBestContact(account, user);
    contactTitleActionBarInflater.update(abstractContact);
    contactTitleActionBarInflater.setStatusText(user);
    contactTitleActionBarInflater.hideStatusIcon();
}
Also used : AbstractContact(com.xabber.android.data.roster.AbstractContact)

Example 2 with AbstractContact

use of com.xabber.android.data.roster.AbstractContact in project xabber-android by redsolution.

the class ChatListAdapter method getView.

@Override
public View getView(int position, View convertView, ViewGroup parent) {
    final AbstractChat abstractChat = (AbstractChat) getItem(position);
    final AbstractContact abstractContact = RosterManager.getInstance().getBestContact(abstractChat.getAccount(), abstractChat.getUser());
    return contactItemInflater.setUpContactView(convertView, parent, abstractContact);
}
Also used : AbstractChat(com.xabber.android.data.message.AbstractChat) AbstractContact(com.xabber.android.data.roster.AbstractContact)

Example 3 with AbstractContact

use of com.xabber.android.data.roster.AbstractContact in project xabber-android by redsolution.

the class QuestionViewer method update.

private void update() {
    AbstractContact abstractContact = RosterManager.getInstance().getBestContact(account, user);
    contactTitleActionBarInflater.update(abstractContact);
}
Also used : AbstractContact(com.xabber.android.data.roster.AbstractContact)

Example 4 with AbstractContact

use of com.xabber.android.data.roster.AbstractContact in project xabber-android by redsolution.

the class ContactListPresenter method createContactListWithAccounts.

private void createContactListWithAccounts(List<IFlexible> items, AccountConfiguration rosterAccount, Comparator<AbstractContact> comparator) {
    AccountWithContactsVO account = AccountWithContactsVO.convert(rosterAccount, this);
    rosterAccount.sortAbstractContacts(comparator);
    for (AbstractContact contact : rosterAccount.getAbstractContacts()) {
        account.addSubItem(SettingsManager.contactsShowMessages() ? ExtContactVO.convert(contact, this) : ContactVO.convert(contact, this));
    }
    items.add(account);
}
Also used : AccountWithContactsVO(com.xabber.android.presentation.ui.contactlist.viewobjects.AccountWithContactsVO) AbstractContact(com.xabber.android.data.roster.AbstractContact)

Example 5 with AbstractContact

use of com.xabber.android.data.roster.AbstractContact in project xabber-android by redsolution.

the class ContactListPresenter method createContactListWithGroups.

private void createContactListWithGroups(List<IFlexible> items, boolean showEmptyGroups, Map<String, GroupConfiguration> groups, Comparator<AbstractContact> comparator) {
    for (GroupConfiguration rosterConfiguration : groups.values()) {
        if (showEmptyGroups || !rosterConfiguration.isEmpty()) {
            GroupVO group = GroupVO.convert(rosterConfiguration, false, this);
            rosterConfiguration.sortAbstractContacts(comparator);
            for (AbstractContact contact : rosterConfiguration.getAbstractContacts()) {
                group.addSubItem(SettingsManager.contactsShowMessages() ? ExtContactVO.convert(contact, this) : ContactVO.convert(contact, this));
            }
            items.add(group);
        }
    }
}
Also used : GroupConfiguration(com.xabber.android.ui.adapter.contactlist.GroupConfiguration) AbstractContact(com.xabber.android.data.roster.AbstractContact) GroupVO(com.xabber.android.presentation.ui.contactlist.viewobjects.GroupVO)

Aggregations

AbstractContact (com.xabber.android.data.roster.AbstractContact)22 AbstractChat (com.xabber.android.data.message.AbstractChat)6 UserJid (com.xabber.android.data.entity.UserJid)5 RoomContact (com.xabber.android.data.extension.muc.RoomContact)5 ArrayList (java.util.ArrayList)5 TextView (android.widget.TextView)4 RoomChat (com.xabber.android.data.extension.muc.RoomChat)4 ChatContact (com.xabber.android.data.message.ChatContact)4 RosterContact (com.xabber.android.data.roster.RosterContact)4 GroupConfiguration (com.xabber.android.ui.adapter.contactlist.GroupConfiguration)4 AccountJid (com.xabber.android.data.entity.AccountJid)3 GroupVO (com.xabber.android.presentation.ui.contactlist.viewobjects.GroupVO)3 IFlexible (eu.davidea.flexibleadapter.items.IFlexible)3 ImageView (android.widget.ImageView)2 CommonState (com.xabber.android.data.account.CommonState)2 Collection (java.util.Collection)2 Map (java.util.Map)2 TreeMap (java.util.TreeMap)2 AdapterContextMenuInfo (android.widget.AdapterView.AdapterContextMenuInfo)1 AccountItem (com.xabber.android.data.account.AccountItem)1