mirror of
https://github.com/cryptomator/cryptomator.git
synced 2024-11-23 12:09:45 +00:00
switch back to UI thread later
see https://github.com/cryptomator/cryptomator/pull/3287#discussion_r1453196792
This commit is contained in:
parent
2225476bf8
commit
a1b712495f
@ -130,7 +130,7 @@ public class ReceiveKeyController implements FxController {
|
||||
.timeout(REQ_TIMEOUT) //
|
||||
.build();
|
||||
httpClient.sendAsync(request, HttpResponse.BodyHandlers.ofString(StandardCharsets.UTF_8)) //
|
||||
.thenAcceptAsync(this::receivedDeviceData, Platform::runLater) //
|
||||
.thenAcceptAsync(this::receivedDeviceData) //
|
||||
.exceptionally(this::retrievalFailed);
|
||||
}
|
||||
|
||||
@ -147,7 +147,7 @@ public class ReceiveKeyController implements FxController {
|
||||
var device = JSON.reader().readValue(response.body(), DeviceDto.class);
|
||||
requestVaultMasterkey(device.userPrivateKey);
|
||||
}
|
||||
case 404 -> needsDeviceRegistration();
|
||||
case 404 -> Platform.runLater(this::needsDeviceRegistration);
|
||||
default -> throw new IllegalStateException("Unexpected response " + response.statusCode());
|
||||
}
|
||||
} catch (IOException e) {
|
||||
|
Loading…
Reference in New Issue
Block a user