Search in sources :

Example 1 with CrowdfundingChatVO

use of com.xabber.android.presentation.ui.contactlist.viewobjects.CrowdfundingChatVO in project xabber-android by redsolution.

the class ContactListPresenter method onItemClick.

public void onItemClick(IFlexible item) {
    if (item instanceof ContactVO) {
        AccountJid accountJid = ((ContactVO) item).getAccountJid();
        UserJid userJid = ((ContactVO) item).getUserJid();
        if (view != null)
            view.onContactClick(RosterManager.getInstance().getAbstractContact(accountJid, userJid));
    } else if (item instanceof ButtonVO) {
        ButtonVO button = (ButtonVO) item;
        if (view != null)
            view.onButtonItemClick(button);
    } else if (item instanceof CrowdfundingChatVO) {
        if (view != null) {
            AccountJid accountJid = CrowdfundingChat.getDefaultAccount();
            UserJid userJid = CrowdfundingChat.getDefaultUser();
            if (accountJid != null && userJid != null)
                view.onContactClick(RosterManager.getInstance().getAbstractContact(accountJid, userJid));
        }
    }
}
Also used : ChatWithButtonVO(com.xabber.android.presentation.ui.contactlist.viewobjects.ChatWithButtonVO) ButtonVO(com.xabber.android.presentation.ui.contactlist.viewobjects.ButtonVO) AccountJid(com.xabber.android.data.entity.AccountJid) ExtContactVO(com.xabber.android.presentation.ui.contactlist.viewobjects.ExtContactVO) ContactVO(com.xabber.android.presentation.ui.contactlist.viewobjects.ContactVO) UserJid(com.xabber.android.data.entity.UserJid) CrowdfundingChatVO(com.xabber.android.presentation.ui.contactlist.viewobjects.CrowdfundingChatVO)

Aggregations

AccountJid (com.xabber.android.data.entity.AccountJid)1 UserJid (com.xabber.android.data.entity.UserJid)1 ButtonVO (com.xabber.android.presentation.ui.contactlist.viewobjects.ButtonVO)1 ChatWithButtonVO (com.xabber.android.presentation.ui.contactlist.viewobjects.ChatWithButtonVO)1 ContactVO (com.xabber.android.presentation.ui.contactlist.viewobjects.ContactVO)1 CrowdfundingChatVO (com.xabber.android.presentation.ui.contactlist.viewobjects.CrowdfundingChatVO)1 ExtContactVO (com.xabber.android.presentation.ui.contactlist.viewobjects.ExtContactVO)1