From e034cf23c0ad702fdb1a2d666ec201b529c43c2e Mon Sep 17 00:00:00 2001 From: Jade_VAN_BRABANDT Date: Wed, 31 May 2023 15:45:21 +0200 Subject: [PATCH] feat : searchbar encore --- Sources/Stim/MainPage.xaml.cs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/Sources/Stim/MainPage.xaml.cs b/Sources/Stim/MainPage.xaml.cs index 99f85f8..d6e26dc 100644 --- a/Sources/Stim/MainPage.xaml.cs +++ b/Sources/Stim/MainPage.xaml.cs @@ -31,21 +31,14 @@ public partial class MainPage : ContentPage string Tag1Text = Tag1.Text; string Tag2Text = Tag2.Text; ((App)App.Current).Manager.ResearchedGame.Clear(); - var filteredGames = ((App)App.Current).Manager.GameList; - if (Game != null) - { - filteredGames = ((App)App.Current).Manager.GameList + + var filteredGames = ((App)App.Current).Manager.GameList .Where(game => game.Name.IndexOf(GameText, StringComparison.OrdinalIgnoreCase) >= 0 && game.Tags.Any(tag => tag.IndexOf(Tag1Text, StringComparison.OrdinalIgnoreCase) >= 0) && game.Tags.Any(tag => tag.IndexOf(Tag2Text, StringComparison.OrdinalIgnoreCase) >= 0) ); - } - if (filteredGames ==null) - { - filteredGames = ((App)App.Current).Manager.GameList; - } foreach (var game in filteredGames) {