mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-03-31 09:33:03 -06:00
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:
parent
628d571d5e
commit
20ab3097e2
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue