From eb377a38d2ed178cab41c3aee95599068133386d Mon Sep 17 00:00:00 2001 From: tangge233 <50769997+tangge233@users.noreply.github.com> Date: Sat, 12 Oct 2024 23:21:41 +0800 Subject: [PATCH] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 龙腾猫跃 <1043137532@qq.com> --- .../Pages/PageDownload/PageDownloadCompFavorites.xaml.vb | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Plain Craft Launcher 2/Pages/PageDownload/PageDownloadCompFavorites.xaml.vb b/Plain Craft Launcher 2/Pages/PageDownload/PageDownloadCompFavorites.xaml.vb index 8ba3e184..2186d5f7 100644 --- a/Plain Craft Launcher 2/Pages/PageDownload/PageDownloadCompFavorites.xaml.vb +++ b/Plain Craft Launcher 2/Pages/PageDownload/PageDownloadCompFavorites.xaml.vb @@ -44,12 +44,7 @@ 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 @@ -57,7 +52,7 @@ ElseIf item.Type = CompType.ModPack Then PanProjectsModpack.Children.Add(EleItem) Else - Log("未知工程类型:" & item.Type) + Log("[Favorites] 未知工程类型:" & item.Type) End If Next End Sub