mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-03-31 17:43:04 -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)
|
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 (
|
if (
|
||||||
DataContext.SelectedChannels is not { Count: 1 }
|
DataContext.SelectedChannels is not { Count: 1 }
|
||||||
|| DataContext.SelectedChannels[0].Channel.IsCategory
|
|| DataContext.SelectedChannels[0].Channel.IsCategory
|
||||||
)
|
)
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
DataContext.ExportCommand.Execute(null);
|
DataContext.ExportCommand.Execute(null);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue