GUI: check SelectedChannels in double-tap handler instead of AvailableChannels

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

View file

@ -25,16 +25,12 @@ public partial class DashboardView : UserControl<DashboardViewModel>
private void AvailableGuildsListBox_OnDoubleTapped(object? sender, TappedEventArgs args) private void AvailableGuildsListBox_OnDoubleTapped(object? sender, TappedEventArgs args)
{ {
// Only works when there is exactly one non-category, child-less channel
if ( if (
DataContext.AvailableChannels is not { Count: 1 } DataContext.SelectedChannels is not { Count: 1 }
|| DataContext.AvailableChannels[0].Channel.IsCategory || DataContext.SelectedChannels[0].Channel.IsCategory
|| DataContext.AvailableChannels[0].Children.Count != 0
) )
return; return;
DataContext.SelectedChannels.Clear();
DataContext.SelectedChannels.Add(DataContext.AvailableChannels[0]);
DataContext.ExportCommand.Execute(null); DataContext.ExportCommand.Execute(null);
} }