@@ -89,28 +89,31 @@ public void start(Stage stage) throws Exception {
89
89
90
90
AppController appController = AppServices .newAppWindow (stage );
91
91
92
- if (createNewWallet ) {
93
- appController .newWallet (null );
94
- }
92
+ final boolean showNewWallet = createNewWallet ;
93
+ javafx .application .Platform .runLater (() -> {
94
+ if (showNewWallet ) {
95
+ appController .newWallet (null );
96
+ }
95
97
96
- List <File > recentWalletFiles = Config .get ().getRecentWalletFiles ();
97
- if (recentWalletFiles != null ) {
98
- //Preserve wallet order as far as possible. Unencrypted wallets will still be opened first.
99
- List <File > encryptedWalletFiles = recentWalletFiles .stream ().filter (Storage ::isEncrypted ).collect (Collectors .toList ());
100
- List <File > sortedWalletFiles = new ArrayList <>(recentWalletFiles );
101
- sortedWalletFiles .removeAll (encryptedWalletFiles );
102
- sortedWalletFiles .addAll (encryptedWalletFiles );
103
-
104
- for (File walletFile : sortedWalletFiles ) {
105
- if (walletFile .exists ()) {
106
- appController .openWalletFile (walletFile , false );
98
+ List <File > recentWalletFiles = Config .get ().getRecentWalletFiles ();
99
+ if (recentWalletFiles != null ) {
100
+ //Preserve wallet order as far as possible. Unencrypted wallets will still be opened first.
101
+ List <File > encryptedWalletFiles = recentWalletFiles .stream ().filter (Storage ::isEncrypted ).collect (Collectors .toList ());
102
+ List <File > sortedWalletFiles = new ArrayList <>(recentWalletFiles );
103
+ sortedWalletFiles .removeAll (encryptedWalletFiles );
104
+ sortedWalletFiles .addAll (encryptedWalletFiles );
105
+
106
+ for (File walletFile : sortedWalletFiles ) {
107
+ if (walletFile .exists ()) {
108
+ appController .openWalletFile (walletFile , false );
109
+ }
107
110
}
108
111
}
109
- }
110
112
111
- AppServices .openFileUriArgumentsAfterWalletLoading (stage );
113
+ AppServices .openFileUriArgumentsAfterWalletLoading (stage );
112
114
113
- AppServices .get ().start ();
115
+ AppServices .get ().start ();
116
+ });
114
117
}
115
118
116
119
@ Override
0 commit comments