mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2026-10-16 21:21:33 +08:00
@@ -69,7 +69,6 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import static org.jackhuang.hmcl.ui.FXUtils.*;
|
||||
@@ -406,6 +405,8 @@ public final class VersionsPage extends Control implements WizardPage, Refreshab
|
||||
VBox.setVgrow(list, Priority.ALWAYS);
|
||||
|
||||
control.versions.addListener((InvalidationListener) o -> updateList());
|
||||
if (!control.versions.isEmpty())
|
||||
updateList();
|
||||
|
||||
list.setCellFactory(listView -> new RemoteVersionListCell(control));
|
||||
|
||||
@@ -493,7 +494,7 @@ public final class VersionsPage extends Control implements WizardPage, Refreshab
|
||||
}
|
||||
|
||||
//noinspection DataFlowIssue
|
||||
list.getItems().setAll(versions.collect(Collectors.toList()));
|
||||
list.getItems().setAll(versions.toList());
|
||||
list.scrollTo(0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user