feat: NeoForge BMCLAPI 版本列表获取

fix: 之前的排序方法会导致 IDE 警告
This commit is contained in:
Pigeon0v0
2024-06-26 23:43:37 +08:00
parent 707b6eec14
commit 2cfa9b2015
3 changed files with 39 additions and 21 deletions
@@ -2191,7 +2191,9 @@ Retry:
Dim FreshStableVersion As DlNeoForgeVersionEntry = Nothing
Dim FreshBetaVersion As DlNeoForgeVersionEntry = Nothing
If Entrys.Any Then
For Each Entry In Entrys
Dim VersionsArray = Entrys.ToList()
VersionsArray.Reverse()
For Each Entry In VersionsArray
If Entry.IsBeta Then
FreshBetaVersion = Entry
Else
@@ -974,11 +974,8 @@
If Not Loader.Output.Any() Then Exit Sub
PanNeoForge.Children.Clear()
Dim VersionsArray As Array = Versions.ToArray()
VersionsArray.Reverse(VersionsArray)
'Versions = Sort(Versions, Function(a, b) New Version(a.Version) > New Version(b.Version)).ToList
NeoForgeDownloadListItemPreload(PanNeoForge, Versions, AddressOf NeoForge_Selected, False)
For Each Version In VersionsArray
For Each Version In Versions
PanNeoForge.Children.Add(NeoForgeDownloadListItem(Version, AddressOf NeoForge_Selected, False))
Next
Catch ex As Exception