@Override protected void deleteUserReceive(User user) { if (user == null) return; Toast.makeText(this, (user.getName() == null) ? user.getJID() : user.getName() + "被删除了", Toast.LENGTH_SHORT).show(); refreshList(); }
@Override protected void changePresenceReceive(User user) { if (user == null) return; if (ContacterManager.contacters.get(user.getJID()) == null) return; if (!user.isAvailable()) if (ContacterManager.contacters.get(user.getJID()).isAvailable()) Toast.makeText(this, (user.getName() == null) ? user.getJID() : user .getName() + "上线了", Toast.LENGTH_SHORT).show(); if (user.isAvailable()) if (!ContacterManager.contacters.get(user.getJID()).isAvailable()) Toast.makeText(this, (user.getName() == null) ? user.getJID() : user .getName() + "下线了", Toast.LENGTH_SHORT).show(); refreshList(); }