void () { if (myRepository.getCurrentUser() != null) { new BoardsComboBoxUpdater() { @Override @NotNull protected List<TrelloBoard> fetch(@NotNull ProgressIndicator indicator) throws Exception { final List<TrelloBoard> boards = super.fetch(indicator); TrelloBoard currentBoard = getSelectedItem(); if (currentBoard != null && currentBoard != TrelloRepository.UNSPECIFIED_BOARD) { final int i = boards.indexOf(currentBoard); // update information about selected board // if it's open and thus downloaded with other boards of user, take info from there, // otherwise issue a separate request currentBoard = i >= 0 ? boards.get(i) : myRepository.fetchBoardById(currentBoard.getId()); myRepository.setCurrentBoard(currentBoard); } return boards; } }.queue(); } if (myRepository.getCurrentBoard() != null && myRepository.getCurrentBoard() != TrelloRepository.UNSPECIFIED_BOARD) { new ListsComboBoxUpdater() { @Override @NotNull protected List<TrelloList> fetch(@NotNull ProgressIndicator indicator) throws Exception { final List<TrelloList> lists = super.fetch(indicator); TrelloList currentList = myRepository.getCurrentList(); if (currentList != null && currentList != TrelloRepository.UNSPECIFIED_LIST) { final int i = lists.indexOf(currentList); currentList = i >= 0 ? lists.get(i) : myRepository.fetchListById(currentList.getId()); final TrelloBoard currentBoard = myRepository.getCurrentBoard(); if (currentBoard != null && !currentList.getIdBoard().equals(currentBoard.getId())) { currentList.setMoved(true); } myRepository.setCurrentList(currentList); } return lists; } }.queue(); } }