mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-03-15 19:32:31 +00:00
Double-clicking a channel auto-opens export setup (#1493)
Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -160,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)">
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Linq;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Input;
|
||||
using Avalonia.Interactivity;
|
||||
using DiscordChatExporter.Core.Discord.Data;
|
||||
using DiscordChatExporter.Gui.Framework;
|
||||
@@ -22,6 +23,21 @@ public partial class DashboardView : UserControl<DashboardViewModel>
|
||||
SelectionChangedEventArgs args
|
||||
) => DataContext.PullChannelsCommand.Execute(null);
|
||||
|
||||
private void ChannelGrid_OnDoubleTapped(object? sender, TappedEventArgs args)
|
||||
{
|
||||
if (sender is not Control { DataContext: ChannelConnection channelConnection })
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (channelConnection.Channel.IsCategory)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
DataContext.ExportCommand.Execute(null);
|
||||
}
|
||||
|
||||
private void AvailableChannelsTreeView_OnSelectionChanged(
|
||||
object? sender,
|
||||
SelectionChangedEventArgs args
|
||||
|
||||
Reference in New Issue
Block a user