fix #1287, fix #1284: sort type is null

This commit is contained in:
Glavo
2022-01-10 18:42:36 +08:00
committed by Yuhui Huang
parent 1780c479d5
commit c0472056ac

View File

@@ -317,6 +317,7 @@ public class DownloadListPage extends Control implements DecoratorPage, VersionP
sortComboBox.prefWidthProperty().bind(sortStackPane.widthProperty());
sortComboBox.getStyleClass().add("fit-width");
sortComboBox.setConverter(stringConverter(sortType -> i18n("curse.sort." + sortType.name().toLowerCase(Locale.ROOT))));
sortComboBox.getItems().setAll(RemoteModRepository.SortType.values());
sortComboBox.getSelectionModel().select(0);
searchPane.addRow(rowIndex++, new Label(i18n("mods.category")), categoryStackPane, new Label(i18n("search.sort")), sortStackPane);