From cd480ac2e33eb305cd0587442689ee80045e309a Mon Sep 17 00:00:00 2001 From: Aaron Powell Date: Tue, 20 Jan 2026 10:02:34 +1100 Subject: [PATCH] fix: Fix In Library filter and add library indicator to depot games MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Changed IsInLibrary() to IsInLibraryAsync() which checks database directly - The sync version was checking Items collection which may not be populated - Added 📚 badge overlay on game covers for games in user's library - Badge appears in top-right corner of cover image --- .../ViewModels/GamesListViewModel.cs | 3 +- .../Views/GamesListView.axaml | 30 ++++++++++--------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/LANCommander.Launcher.Avalonia/ViewModels/GamesListViewModel.cs b/LANCommander.Launcher.Avalonia/ViewModels/GamesListViewModel.cs index 1097b97f..f036af92 100644 --- a/LANCommander.Launcher.Avalonia/ViewModels/GamesListViewModel.cs +++ b/LANCommander.Launcher.Avalonia/ViewModels/GamesListViewModel.cs @@ -98,7 +98,8 @@ public partial class GamesListViewModel : ViewModelBase { if (item.DataItem is SDK.Models.DepotGame depotGame) { - var inLibrary = libraryService.IsInLibrary(depotGame.Id); + // Use async method that checks database directly + var inLibrary = await libraryService.IsInLibraryAsync(depotGame.Id); // Get cover path - use MediaClient which works with SDK models string? coverPath = await GetOrDownloadCoverAsync(depotGame.Cover, mediaClient); diff --git a/LANCommander.Launcher.Avalonia/Views/GamesListView.axaml b/LANCommander.Launcher.Avalonia/Views/GamesListView.axaml index 486bd811..c634be8c 100644 --- a/LANCommander.Launcher.Avalonia/Views/GamesListView.axaml +++ b/LANCommander.Launcher.Avalonia/Views/GamesListView.axaml @@ -145,6 +145,17 @@ HorizontalAlignment="Center" VerticalAlignment="Center" /> + + + + + @@ -157,20 +168,11 @@ TextWrapping="Wrap" Height="36" /> - - - - - - - - + +