From a6fc6f3d90f0b497357c3610f64de73cef4ef81d Mon Sep 17 00:00:00 2001 From: dpolishc Date: Sun, 2 Jun 2019 22:06:08 +0200 Subject: [PATCH] Duplicate check on import should be run in background #4963 --- .../java/org/jabref/gui/importer/ImportEntriesDialog.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/jabref/gui/importer/ImportEntriesDialog.java b/src/main/java/org/jabref/gui/importer/ImportEntriesDialog.java index af0264f0229..40ad459433b 100644 --- a/src/main/java/org/jabref/gui/importer/ImportEntriesDialog.java +++ b/src/main/java/org/jabref/gui/importer/ImportEntriesDialog.java @@ -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));