Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: 龙腾猫跃 <[email protected]>
  • Loading branch information
tangge233 and LTCatt authored Oct 12, 2024
1 parent e37e559 commit eb377a3
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,15 @@
Private Sub RefreshContent()
PanProjectsMod.Children.Clear()
PanProjectsModpack.Children.Clear()
Dim DataSource As List(Of CompProject)
If IsSearching Then
DataSource = SearchResult
Else
DataSource = Loader.Output
End If
Dim DataSource As List(Of CompProject) = If(IsSearching, SearchResult, Loader.Output)
For Each item As CompProject In DataSource
Dim EleItem As MyCompItem = item.ToCompItem(True, True)
If item.Type = CompType.Mod Then
PanProjectsMod.Children.Add(EleItem)
ElseIf item.Type = CompType.ModPack Then
PanProjectsModpack.Children.Add(EleItem)
Else
Log("未知工程类型:" & item.Type)
Log("[Favorites] 未知工程类型:" & item.Type)
End If
Next
End Sub
Expand Down

0 comments on commit eb377a3

Please sign in to comment.