fix(download): cannot refresh mod download list. Mentioned in #1203.
This commit is contained in:
@@ -84,7 +84,12 @@ public class DownloadPage extends Control implements DecoratorPage {
|
|||||||
this.mod = ModTranslations.getModByCurseForgeId(addon.getSlug());
|
this.mod = ModTranslations.getModByCurseForgeId(addon.getSlug());
|
||||||
this.version = version;
|
this.version = version;
|
||||||
this.callback = callback;
|
this.callback = callback;
|
||||||
|
loadModVersions();
|
||||||
|
|
||||||
|
this.state.set(State.fromTitle(addon.getTitle()));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void loadModVersions() {
|
||||||
File versionJar = StringUtils.isNotBlank(version.getVersion())
|
File versionJar = StringUtils.isNotBlank(version.getVersion())
|
||||||
? version.getProfile().getRepository().getVersionJar(version.getVersion())
|
? version.getProfile().getRepository().getVersionJar(version.getVersion())
|
||||||
: null;
|
: null;
|
||||||
@@ -122,8 +127,6 @@ public class DownloadPage extends Control implements DecoratorPage {
|
|||||||
}
|
}
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
}).start();
|
}).start();
|
||||||
|
|
||||||
this.state.set(State.fromTitle(addon.getTitle()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private SimpleMultimap<String, RemoteMod.Version> sortVersions(Stream<RemoteMod.Version> versions) {
|
private SimpleMultimap<String, RemoteMod.Version> sortVersions(Stream<RemoteMod.Version> versions) {
|
||||||
@@ -297,6 +300,7 @@ public class DownloadPage extends Control implements DecoratorPage {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}, getSkinnable().failedProperty()));
|
}, getSkinnable().failedProperty()));
|
||||||
|
spinnerPane.setOnFailedAction(e -> getSkinnable().loadModVersions());
|
||||||
|
|
||||||
ComponentList list = new ComponentList();
|
ComponentList list = new ComponentList();
|
||||||
StackPane.setAlignment(list, Pos.TOP_CENTER);
|
StackPane.setAlignment(list, Pos.TOP_CENTER);
|
||||||
|
|||||||
Reference in New Issue
Block a user