private User getUserByLogin(String userLogin) {
   for (int i = 0; i < mUserList.size(); i++) {
     final User user = mUserList.get(i);
     if (user.getUserLogin().equalsIgnoreCase(StringUtils.parseBareAddress(userLogin))) {
       return user;
     }
   }
   return null;
 }
 public User getUserByFullUserLogin(String fullUserLogin) {
   for (int i = 0; i < mUserList.size(); i++) {
     final User user = mUserList.get(i);
     if (user.getFullUserLogin().equalsIgnoreCase(fullUserLogin)) {
       return user;
     }
   }
   return null;
 }
Ejemplo n.º 3
0
  /**
   * Cancels all file transfers, sets all users as logged off, and removes them from the user list.
   */
  private void removeAllUsers() {
    final UserList userList = getUserList();

    for (int i = 0; i < userList.size(); i++) {
      final User user = userList.get(i);

      if (!user.isMe()) {
        user.setOnline(false);
        cancelFileTransfers(user);
        userList.remove(user);

        if (user.getPrivchat() != null) {
          msgController.showPrivateSystemMessage(user, "You logged off");
          user.getPrivchat().setLoggedOff();
        }

        i--;
      }
    }
  }
Ejemplo n.º 4
0
 @Override
 public Object getItem(int position) {
   return mList.get(position);
 }
Ejemplo n.º 5
0
 private User getUser(int position) {
   return mList.get(position);
 }