From a07a218b1449a3cf968a0db38eb8dfdc1b823034 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konrad=20Kwieci=C5=84ski?= Date: Sun, 27 Sep 2026 17:47:37 +0200 Subject: [PATCH] ActionsList: toggle category badge selection --- .../ScriptRunner.GUI/Views/ActionsList.axaml.cs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/ScriptRunner/ScriptRunner.GUI/Views/ActionsList.axaml.cs b/src/ScriptRunner/ScriptRunner.GUI/Views/ActionsList.axaml.cs index ffbd24b..b0e558f 100644 --- a/src/ScriptRunner/ScriptRunner.GUI/Views/ActionsList.axaml.cs +++ b/src/ScriptRunner/ScriptRunner.GUI/Views/ActionsList.axaml.cs @@ -125,10 +125,17 @@ private void CategoryBadge_OnTapped(object? sender, RoutedEventArgs e) } if (DataContext is MainWindowViewModel viewModel) - { - viewModel.SelectedCategoryFilter = category; - // Gray state will be updated by PropertyChanged handler - } + { + if (viewModel.SelectedCategoryFilter != category) + { + viewModel.SelectedCategoryFilter = category; + } + else if (category != "All") + { + viewModel.SelectedCategoryFilter = "All"; + } + // Gray state will be updated by PropertyChanged handler + } } }