Search in sources :

Example 61 with UserJid

use of com.xabber.android.data.entity.UserJid in project xabber-android by redsolution.

the class BlockedListActivity method onSaveInstanceState.

@Override
protected void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);
    ArrayList<UserJid> checkedContacts = adapter.getCheckedContacts();
    ArrayList<String> checkedContactsStringList = new ArrayList<>();
    for (UserJid jid : checkedContacts) {
        checkedContactsStringList.add(jid.toString());
    }
    outState.putStringArrayList(SAVED_CHECKED_CONTACTS, checkedContactsStringList);
}
Also used : ArrayList(java.util.ArrayList) UserJid(com.xabber.android.data.entity.UserJid)

Example 62 with UserJid

use of com.xabber.android.data.entity.UserJid in project xabber-android by redsolution.

the class ChatActivity method getInitialChatFromIntent.

private void getInitialChatFromIntent() {
    Intent intent = getIntent();
    AccountJid newAccount = getAccount(intent);
    UserJid newUser = getUser(intent);
    if (newAccount != null) {
        this.account = newAccount;
    }
    if (newUser != null) {
        this.user = newUser;
    }
    LogManager.i(LOG_TAG, "getInitialChatFromIntent " + this.user);
}
Also used : AccountJid(com.xabber.android.data.entity.AccountJid) UserJid(com.xabber.android.data.entity.UserJid) Intent(android.content.Intent)

Example 63 with UserJid

use of com.xabber.android.data.entity.UserJid in project xabber-android by redsolution.

the class ContactListActivity method showMucInviteDialog.

private void showMucInviteDialog() {
    Intent intent = getIntent();
    AccountJid account = getRoomInviteAccount(intent);
    UserJid user = getRoomInviteUser(intent);
    if (account != null && user != null) {
        MucInviteDialog.newInstance(account, user).show(getFragmentManager(), MucInviteDialog.class.getName());
    }
}
Also used : MucInviteDialog(com.xabber.android.ui.dialog.MucInviteDialog) AccountJid(com.xabber.android.data.entity.AccountJid) UserJid(com.xabber.android.data.entity.UserJid) Intent(android.content.Intent)

Example 64 with UserJid

use of com.xabber.android.data.entity.UserJid in project xabber-android by redsolution.

the class ContactListActivity method showContactSubscriptionDialog.

private void showContactSubscriptionDialog() {
    Intent intent = getIntent();
    AccountJid account = getRoomInviteAccount(intent);
    UserJid user = getRoomInviteUser(intent);
    if (account != null && user != null) {
        ContactSubscriptionDialog.newInstance(account, user).show(getFragmentManager(), ContactSubscriptionDialog.class.getName());
    }
}
Also used : AccountJid(com.xabber.android.data.entity.AccountJid) UserJid(com.xabber.android.data.entity.UserJid) Intent(android.content.Intent) ContactSubscriptionDialog(com.xabber.android.ui.dialog.ContactSubscriptionDialog)

Example 65 with UserJid

use of com.xabber.android.data.entity.UserJid in project xabber-android by redsolution.

the class BlockedListAdapter method onChange.

@Override
public void onChange() {
    blockedContacts.clear();
    final Collection<UserJid> blockedContacts = BlockingManager.getInstance().getCachedBlockedContacts(account);
    if (blockedContacts != null) {
        this.blockedContacts.addAll(blockedContacts);
    }
    // remove checked contacts not containing in new blocked list
    final Iterator<UserJid> iterator = checkedContacts.iterator();
    while (iterator.hasNext()) {
        final UserJid next = iterator.next();
        if (!this.blockedContacts.contains(next)) {
            iterator.remove();
        }
    }
    notifyDataSetChanged();
}
Also used : UserJid(com.xabber.android.data.entity.UserJid)

Aggregations

UserJid (com.xabber.android.data.entity.UserJid)67 AccountJid (com.xabber.android.data.entity.AccountJid)43 AbstractChat (com.xabber.android.data.message.AbstractChat)15 ArrayList (java.util.ArrayList)15 Intent (android.content.Intent)9 Jid (org.jxmpp.jid.Jid)9 Presence (org.jivesoftware.smack.packet.Presence)8 XmppStringprepException (org.jxmpp.stringprep.XmppStringprepException)8 AccountItem (com.xabber.android.data.account.AccountItem)7 AbstractContact (com.xabber.android.data.roster.AbstractContact)6 Message (org.jivesoftware.smack.packet.Message)6 Resourcepart (org.jxmpp.jid.parts.Resourcepart)6 NetworkException (com.xabber.android.data.NetworkException)5 IFlexible (eu.davidea.flexibleadapter.items.IFlexible)5 SmackException (org.jivesoftware.smack.SmackException)5 Uri (android.net.Uri)4 ContactVO (com.xabber.android.presentation.ui.contactlist.viewobjects.ContactVO)4 DomainBareJid (org.jxmpp.jid.DomainBareJid)4 TextView (android.widget.TextView)3 MessageItem (com.xabber.android.data.database.messagerealm.MessageItem)3