mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-05-17 10:11:27 +00:00
no need to run code in ui thread
This commit is contained in:
@@ -70,7 +70,7 @@ public class ReceiveKeyController implements FxController {
|
||||
.build();
|
||||
httpClient.sendAsync(request, HttpResponse.BodyHandlers.ofInputStream()) //
|
||||
.thenAcceptAsync(this::loadedExistingKey, Platform::runLater) //
|
||||
.exceptionallyAsync(this::retrievalFailed, Platform::runLater);
|
||||
.exceptionally(this::retrievalFailed);
|
||||
}
|
||||
|
||||
private void loadedExistingKey(HttpResponse<InputStream> response) {
|
||||
|
||||
@@ -76,7 +76,7 @@ public class RegisterDeviceController implements FxController {
|
||||
.build();
|
||||
httpClient.sendAsync(request, HttpResponse.BodyHandlers.discarding()) //
|
||||
.thenAcceptAsync(this::registrationSucceeded, Platform::runLater) //
|
||||
.exceptionallyAsync(this::registrationFailed, Platform::runLater);
|
||||
.exceptionally(this::registrationFailed);
|
||||
}
|
||||
|
||||
private void registrationSucceeded(HttpResponse<Void> voidHttpResponse) {
|
||||
|
||||
Reference in New Issue
Block a user