diff --git a/src/main/java/ch/hepia/ui/MainWindowController.java b/src/main/java/ch/hepia/ui/MainWindowController.java index 318b7c19e6602407321246d3e5be656625d48908..7cd8f7533f16ae88ee4c1638c8d5806aeea384aa 100644 --- a/src/main/java/ch/hepia/ui/MainWindowController.java +++ b/src/main/java/ch/hepia/ui/MainWindowController.java @@ -256,6 +256,7 @@ public class MainWindowController implements Initializable { /** * Create a new journey and broadcast it + * Set the journey label and the current journey * @param app App context * @param pnl Panel containing the journey information */ @@ -283,17 +284,19 @@ public class MainWindowController implements Initializable { if (command.length > 1) { Main.getContext().getUser().get().addIgnoredUser(new User(command[1])); drawMessage(command[1] + " bloqué.", - "/img/help.png", c); + AppConfig.HELP_MESSAGE_ICON, c); } break; case "ignoredlist": List<User> list = Main.getContext().getUser().get().getIgnoredUserList(); - StringBuilder buffer = new StringBuilder(list.get(0).getName()); - for (int i = 1; i < list.size(); i++){ - buffer.append(", ").append(list.get(i).getName()); + if (list.size() > 0) { + StringBuilder buffer = new StringBuilder(list.get(0).getName()); + for (int i = 1; i < list.size(); i++){ + buffer.append(", ").append(list.get(i).getName()); + } + drawMessage("Bloqués : " + buffer.toString(), + AppConfig.HELP_MESSAGE_ICON, c); } - drawMessage("Bloqués : " + buffer.toString(), - "/img/help.png", c); break; } } else {