Skip to content

Commit

Permalink
Close pop over early (#10477)
Browse files Browse the repository at this point in the history
Co-authored-by: Kevin Klein <[email protected]>
  • Loading branch information
koppor and 0x002A authored Oct 10, 2023
1 parent 3e4fcc1 commit c444c73
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ public void execute() {
BackgroundTask<Optional<BibEntry>> backgroundTask = searchAndImportEntryInBackground();
backgroundTask.titleProperty().set(Localization.lang("Import by ID"));
backgroundTask.showToUser(true);
backgroundTask.onRunning(() -> dialogService.notify("%s".formatted(backgroundTask.messageProperty().get())));
backgroundTask.onRunning(() -> {
entryFromIdPopOver.hide();
dialogService.notify("%s".formatted(backgroundTask.messageProperty().get()));
});
backgroundTask.onFailure(exception -> {
String fetcherExceptionMessage = exception.getMessage();

Expand Down Expand Up @@ -95,8 +98,6 @@ public void execute() {
} else {
dialogService.notify("No entry found or import canceled");
}

entryFromIdPopOver.hide();
});
backgroundTask.executeWith(taskExecutor);
}
Expand Down

0 comments on commit c444c73

Please sign in to comment.