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);
}
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);
}
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());
}
}
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());
}
}
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();
}
Aggregations