GUI: guard double-tap handler against empty-space clicks; add braces

Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-02-27 16:39:10 +00:00
parent 628d571d5e
commit 20ab3097e2

View file

@ -25,11 +25,19 @@ public partial class DashboardView : UserControl<DashboardViewModel>
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);
}