Merge pull request #5776 from Open-KFC/fix4677

Fix:通过网络获取到更多可更新模组时未同步至‘可更新’模组列表视图
This commit is contained in:
龙腾猫跃
2025-04-29 01:11:45 +08:00
committed by GitHub
2 changed files with 12 additions and 1 deletions
@@ -1127,7 +1127,11 @@ Finished:
Next Next
WriteFile(PathTemp & "Cache\LocalMod.json", Cache.ToString(If(ModeDebug, Newtonsoft.Json.Formatting.Indented, Newtonsoft.Json.Formatting.None))) WriteFile(PathTemp & "Cache\LocalMod.json", Cache.ToString(If(ModeDebug, Newtonsoft.Json.Formatting.Indented, Newtonsoft.Json.Formatting.None)))
'刷新边栏 '刷新边栏
If FrmVersionMod?.CurrentViewNeedSyncOnModDetailLoaded() Then
RunInUi(Sub() FrmVersionMod?.RefreshUI()) '调用RefreshUI而不是RefreshBars以同步可更新模组列表视图 (#4677)
Else
RunInUi(Sub() FrmVersionMod?.RefreshBars()) RunInUi(Sub() FrmVersionMod?.RefreshBars())
End If
End Sub End Sub
Public Function GetTargetModLoaders() As List(Of CompModLoaderType) Public Function GetTargetModLoaders() As List(Of CompModLoaderType)
Dim ModLoaders As New List(Of CompModLoaderType) Dim ModLoaders As New List(Of CompModLoaderType)
@@ -462,6 +462,13 @@ Install:
Unavailable = 4 Unavailable = 4
End Enum End Enum
''' <returns>
''' True - 当前显示的模组列表视图需要在从网络获取模组详细信息(例如是否有更新版本)后同步
''' </returns>
Public Function CurrentViewNeedSyncOnModDetailLoaded() As Boolean
Return Filter = FilterType.CanUpdate
End Function
''' <summary> ''' <summary>
''' 检查该 Mod 项是否符合当前筛选的类别。 ''' 检查该 Mod 项是否符合当前筛选的类别。
''' </summary> ''' </summary>