fix: load fabric api version list by incorrect game version. Closes #1273.

This commit is contained in:
huanghongxun
2022-01-02 00:49:30 +08:00
parent 56538623a5
commit 2436dab797
3 changed files with 2 additions and 17 deletions

View File

@@ -118,7 +118,7 @@ public class DownloadListPage extends Control implements DecoratorPage, VersionP
if (!searchInitialized) {
searchInitialized = true;
search("", null, 0, "", 0);
search("", null, 0, "", RemoteModRepository.SortType.DATE_CREATED);
}
if (versionSelection) {

View File

@@ -48,7 +48,7 @@ public class ModDownloadListPage extends DownloadListPage {
private class Repository implements RemoteModRepository {
@Override
public Stream<RemoteMod> search(String gameVersion, Category category, int pageOffset, int pageSize, String searchFilter, int sort) throws IOException {
public Stream<RemoteMod> search(String gameVersion, Category category, int pageOffset, int pageSize, String searchFilter, SortType sort) throws IOException {
String newSearchFilter;
if (StringUtils.CHINESE_PATTERN.matcher(searchFilter).find()) {
List<ModTranslations.Mod> mods = ModTranslations.searchMod(searchFilter);