forked from j62/ctbrec
1
0
Fork 0

Don't show dialog, if no model account has been deleted

This commit is contained in:
0xb00bface 2020-12-15 18:37:04 +01:00
parent 2f0ef47acf
commit 372fcd0d13
1 changed files with 20 additions and 19 deletions

View File

@ -56,6 +56,7 @@ public class CheckModelAccountAction {
} }
} }
} finally { } finally {
if (!deletedAccounts.isEmpty()) {
Platform.runLater(() -> { Platform.runLater(() -> {
b.setDisable(false); b.setDisable(false);
b.setText(buttonText); b.setText(buttonText);
@ -68,7 +69,6 @@ public class CheckModelAccountAction {
.append(deletedModel.getUrl()) .append(deletedModel.getUrl())
.append(')').append('\n'); .append(')').append('\n');
} }
boolean remove = Dialogs.showConfirmDialog("Deleted Accounts", sb.toString(), boolean remove = Dialogs.showConfirmDialog("Deleted Accounts", sb.toString(),
"The following accounts seem to have been deleted. Do you want to remove them?", b.getScene()); "The following accounts seem to have been deleted. Do you want to remove them?", b.getScene());
if (remove) { if (remove) {
@ -76,6 +76,7 @@ public class CheckModelAccountAction {
} }
}); });
} }
}
}); });
new Thread(checker).start(); new Thread(checker).start();
} }