diff --git a/client/src/main/java/ctbrec/ui/action/CheckModelAccountAction.java b/client/src/main/java/ctbrec/ui/action/CheckModelAccountAction.java index 7bdf7cea..f778a30e 100644 --- a/client/src/main/java/ctbrec/ui/action/CheckModelAccountAction.java +++ b/client/src/main/java/ctbrec/ui/action/CheckModelAccountAction.java @@ -56,26 +56,23 @@ public class CheckModelAccountAction { } } } finally { - if (!deletedAccounts.isEmpty()) { - Platform.runLater(() -> { - b.setDisable(false); - b.setText(buttonText); + Platform.runLater(() -> { + b.setDisable(false); + b.setText(buttonText); + if (!deletedAccounts.isEmpty()) { StringBuilder sb = new StringBuilder(); for (Model deletedModel : deletedAccounts) { String name = deletedModel.getDisplayName() + " ".repeat(30); name = name.substring(0, 30); - sb.append(name) - .append(' ').append('(') - .append(deletedModel.getUrl()) - .append(')').append('\n'); + sb.append(name).append(' ').append('(').append(deletedModel.getUrl()).append(')').append('\n'); } boolean remove = Dialogs.showConfirmDialog("Deleted Accounts", sb.toString(), "The following accounts seem to have been deleted. Do you want to remove them?", b.getScene()); if (remove) { new StopRecordingAction(b, deletedAccounts, recorder).execute(); } - }); - } + } + }); } }); new Thread(checker).start();