File tree Expand file tree Collapse file tree
HMCL/src/main/java/org/jackhuang/hmcl/ui/versions Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -115,26 +115,25 @@ public void refresh() {
115115
116116 setLoading (true );
117117 Task .supplyAsync (Schedulers .io (), () -> {
118- // Ensure the game version number is parsed
119- profile .getRepository ().getGameVersion (id );
120- try (Stream <World > stream = World .getWorlds (savesDir )) {
121- return stream .toList ();
122- }
123- })
124- .whenComplete (Schedulers .javafx (), (result , exception ) -> {
125- if (refreshCount != currentRefresh ) {
126- // A newer refresh task is running, discard this result
127- return ;
128- }
129-
130- worlds = result ;
131- updateWorldList ();
132-
133- if (exception != null )
134- LOG .warning ("Failed to load world list page" , exception );
135-
136- setLoading (false );
137- }).start ();
118+ // Ensure the game version number is parsed
119+ profile .getRepository ().getGameVersion (id );
120+ try (Stream <World > stream = World .getWorlds (savesDir )) {
121+ return stream .toList ();
122+ }
123+ }).whenComplete (Schedulers .javafx (), (result , exception ) -> {
124+ if (refreshCount != currentRefresh ) {
125+ // A newer refresh task is running, discard this result
126+ return ;
127+ }
128+
129+ worlds = result ;
130+ updateWorldList ();
131+
132+ if (exception != null )
133+ LOG .warning ("Failed to load world list page" , exception );
134+
135+ setLoading (false );
136+ }).start ();
138137 }
139138
140139 public void add () {
You can’t perform that action at this time.
0 commit comments