From 9fe2ea20822a204714efe24a7aeea0b8340f1d65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kham=C3=BBl?= <32278516+LordOfRhun@users.noreply.github.com> Date: Thu, 7 May 2020 22:38:54 -0400 Subject: [PATCH] Fixed a bug related to Game filter and OnlyInstalled filter Fixed a bug where filtering by OnlyInstalled while having a uninstalled game selected in the game filter would show no result. --- Wabbajack/View Models/Gallery/ModListGalleryVM.cs | 7 +++++++ Wabbajack/Views/ModListGalleryView.xaml | 1 + 2 files changed, 8 insertions(+) diff --git a/Wabbajack/View Models/Gallery/ModListGalleryVM.cs b/Wabbajack/View Models/Gallery/ModListGalleryVM.cs index deb5ad8e..63150809 100644 --- a/Wabbajack/View Models/Gallery/ModListGalleryVM.cs +++ b/Wabbajack/View Models/Gallery/ModListGalleryVM.cs @@ -28,6 +28,8 @@ namespace Wabbajack private const string ALL_GAME_TYPE = "All"; + public ICommand OnlyInstalledCheckedCommand { get; } + [Reactive] public IErrorResponse Error { get; set; } @@ -98,6 +100,11 @@ namespace Wabbajack .Select(c => c > 0) .ToProperty(this, nameof(Loaded)); + OnlyInstalledCheckedCommand = ReactiveCommand.Create(() => + { + GameType = ALL_GAME_TYPE; + }); + // Convert to VM and bind to resulting list sourceList .ObserveOnGuiThread() diff --git a/Wabbajack/Views/ModListGalleryView.xaml b/Wabbajack/Views/ModListGalleryView.xaml index 55a54cf1..af20b13d 100644 --- a/Wabbajack/Views/ModListGalleryView.xaml +++ b/Wabbajack/Views/ModListGalleryView.xaml @@ -129,6 +129,7 @@ Margin="10,0,10,0" VerticalAlignment="Center" Content="Only Installed" + Command="{Binding OnlyInstalledCheckedCommand}" Foreground="{StaticResource ForegroundBrush}" />