mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-11-02 12:26:45 +00:00
delay show password dialog until initial app window open has completed
This commit is contained in:
parent
e131f645f6
commit
31f287125f
1 changed files with 19 additions and 16 deletions
|
@ -89,28 +89,31 @@ public class SparrowDesktop extends Application {
|
||||||
|
|
||||||
AppController appController = AppServices.newAppWindow(stage);
|
AppController appController = AppServices.newAppWindow(stage);
|
||||||
|
|
||||||
if(createNewWallet) {
|
final boolean showNewWallet = createNewWallet;
|
||||||
appController.newWallet(null);
|
javafx.application.Platform.runLater(() -> {
|
||||||
}
|
if(showNewWallet) {
|
||||||
|
appController.newWallet(null);
|
||||||
|
}
|
||||||
|
|
||||||
List<File> recentWalletFiles = Config.get().getRecentWalletFiles();
|
List<File> recentWalletFiles = Config.get().getRecentWalletFiles();
|
||||||
if(recentWalletFiles != null) {
|
if(recentWalletFiles != null) {
|
||||||
//Preserve wallet order as far as possible. Unencrypted wallets will still be opened first.
|
//Preserve wallet order as far as possible. Unencrypted wallets will still be opened first.
|
||||||
List<File> encryptedWalletFiles = recentWalletFiles.stream().filter(Storage::isEncrypted).collect(Collectors.toList());
|
List<File> encryptedWalletFiles = recentWalletFiles.stream().filter(Storage::isEncrypted).collect(Collectors.toList());
|
||||||
List<File> sortedWalletFiles = new ArrayList<>(recentWalletFiles);
|
List<File> sortedWalletFiles = new ArrayList<>(recentWalletFiles);
|
||||||
sortedWalletFiles.removeAll(encryptedWalletFiles);
|
sortedWalletFiles.removeAll(encryptedWalletFiles);
|
||||||
sortedWalletFiles.addAll(encryptedWalletFiles);
|
sortedWalletFiles.addAll(encryptedWalletFiles);
|
||||||
|
|
||||||
for(File walletFile : sortedWalletFiles) {
|
for(File walletFile : sortedWalletFiles) {
|
||||||
if(walletFile.exists()) {
|
if(walletFile.exists()) {
|
||||||
appController.openWalletFile(walletFile, false);
|
appController.openWalletFile(walletFile, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
AppServices.openFileUriArgumentsAfterWalletLoading(stage);
|
AppServices.openFileUriArgumentsAfterWalletLoading(stage);
|
||||||
|
|
||||||
AppServices.get().start();
|
AppServices.get().start();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue