Skip to content

Commit

Permalink
Set error to the status bar if picks links failed
Browse files Browse the repository at this point in the history
  • Loading branch information
EXL committed Feb 15, 2018
1 parent 6ca5e0f commit 1318168
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main/java/ru/exlmoto/qafhp/PostController.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,13 @@ private void buttonLinksAns() {
for (int i = 1; i < linksList.size(); i += 2) {
sb.append(linksList.get(i)).append("\n");
}
textAreaAns.setText(sb.toString());
answer = sb.toString().trim();
if (!answer.isEmpty()) {
textAreaAns.setText(answer);
labelStatusBar.setText("Done!");
} else {
labelStatusBar.setText("Error: answer doesn't contains direct links.");
}
}

@FXML
Expand Down

0 comments on commit 1318168

Please sign in to comment.