From 20ab3097e23e0123fa68c6e8f1714039d8e2c179 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 27 Feb 2026 16:39:10 +0000 Subject: [PATCH] GUI: guard double-tap handler against empty-space clicks; add braces Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com> --- .../Views/Components/DashboardView.axaml.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/DiscordChatExporter.Gui/Views/Components/DashboardView.axaml.cs b/DiscordChatExporter.Gui/Views/Components/DashboardView.axaml.cs index 4a35263e..ddbe7051 100644 --- a/DiscordChatExporter.Gui/Views/Components/DashboardView.axaml.cs +++ b/DiscordChatExporter.Gui/Views/Components/DashboardView.axaml.cs @@ -25,11 +25,19 @@ public partial class DashboardView : UserControl private void AvailableGuildsListBox_OnDoubleTapped(object? sender, TappedEventArgs args) { + // Ensure the tap was on an actual guild item, not empty space in the list + if (args.Source is not Control { DataContext: Guild }) + { + return; + } + if ( DataContext.SelectedChannels is not { Count: 1 } || DataContext.SelectedChannels[0].Channel.IsCategory ) + { return; + } DataContext.ExportCommand.Execute(null); }