Skip to content

Commit

Permalink
Duplicate check on import should be run in background JabRef#4963
Browse files Browse the repository at this point in the history
  • Loading branch information
dpolishc committed Jun 2, 2019
1 parent 006a443 commit a6fc6f3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ private void initialize() {
container.getStyleClass().add("entry-container");
BindingsHelper.includePseudoClassWhen(container, entrySelected, addToggle.selectedProperty());

BackgroundTask.wrap(() -> viewModel.hasDuplicate(entry)).onSuccess(e -> {
if (e) {
BackgroundTask.wrap(() -> viewModel.hasDuplicate(entry)).onSuccess(duplicateFound -> {
if (duplicateFound) {
Button duplicateButton = IconTheme.JabRefIcons.DUPLICATE.asButton();
duplicateButton.setTooltip(new Tooltip(Localization.lang("Possible duplicate of existing entry. Click to resolve.")));
duplicateButton.setOnAction(event -> viewModel.resolveDuplicate(entry));
Expand Down

0 comments on commit a6fc6f3

Please sign in to comment.