GUI: move DoubleTapped handler to channel Grid inside TreeDataTemplate

Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-02-27 17:05:22 +00:00
parent f42ddef3e7
commit d6a70484c1
2 changed files with 4 additions and 5 deletions

View file

@ -142,7 +142,6 @@
<Border Grid.Column="1">
<TreeView
x:Name="AvailableChannelsTreeView"
DoubleTapped="AvailableChannelsTreeView_OnDoubleTapped"
ItemsSource="{Binding AvailableChannels}"
SelectedItems="{Binding SelectedChannels}"
SelectionChanged="AvailableChannelsTreeView_OnSelectionChanged"
@ -161,7 +160,8 @@
<Grid
Background="Transparent"
Classes.category="{Binding Channel.IsCategory}"
ColumnDefinitions="Auto,*,Auto">
ColumnDefinitions="Auto,*,Auto"
DoubleTapped="ChannelGrid_OnDoubleTapped">
<Grid.Styles>
<Style Selector="Grid">
<Style Selector="^:not(.category)">

View file

@ -23,10 +23,9 @@ public partial class DashboardView : UserControl<DashboardViewModel>
SelectionChangedEventArgs args
) => DataContext.PullChannelsCommand.Execute(null);
private void AvailableChannelsTreeView_OnDoubleTapped(object? sender, TappedEventArgs args)
private void ChannelGrid_OnDoubleTapped(object? sender, TappedEventArgs args)
{
// Ensure the tap was on an actual channel item, not empty space in the tree
if (args.Source is not Control { DataContext: ChannelConnection channelConnection })
if (sender is not Control { DataContext: ChannelConnection channelConnection })
{
return;
}