mirror of
https://github.com/cryptomator/cryptomator.git
synced 2024-11-26 21:40:29 +00:00
Always hide spinner, as soon as locationPresetLoading is finished
This commit is contained in:
parent
830bb5776f
commit
062c674ef1
@ -150,10 +150,13 @@ public class CreateNewVaultLocationController implements FxController {
|
||||
|
||||
private void loadLocationPresets() {
|
||||
Platform.runLater(() -> loadingPresetLocations.set(true));
|
||||
LocationPresetsProvider.loadAll(LocationPresetsProvider.class) //
|
||||
.flatMap(LocationPresetsProvider::getLocations) //we do not use sorted(), because it evaluates the stream elements, blocking until all elements are gathered
|
||||
.forEach(this::createRadioButtonFor);
|
||||
Platform.runLater(() -> loadingPresetLocations.set(false));
|
||||
try{
|
||||
LocationPresetsProvider.loadAll(LocationPresetsProvider.class) //
|
||||
.flatMap(LocationPresetsProvider::getLocations) //we do not use sorted(), because it evaluates the stream elements, blocking until all elements are gathered
|
||||
.forEach(this::createRadioButtonFor);
|
||||
} finally {
|
||||
Platform.runLater(() -> loadingPresetLocations.set(false));
|
||||
}
|
||||
}
|
||||
|
||||
private void createRadioButtonFor(LocationPreset preset) {
|
||||
|
Loading…
Reference in New Issue
Block a user