mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-03-31 09:33:03 -06: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:
parent
40491bdc0f
commit
5e39611395
|
|
@ -160,7 +160,8 @@
|
||||||
<Grid
|
<Grid
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
Classes.category="{Binding Channel.IsCategory}"
|
Classes.category="{Binding Channel.IsCategory}"
|
||||||
ColumnDefinitions="Auto,*,Auto">
|
ColumnDefinitions="Auto,*,Auto"
|
||||||
|
DoubleTapped="ChannelGrid_OnDoubleTapped">
|
||||||
<Grid.Styles>
|
<Grid.Styles>
|
||||||
<Style Selector="Grid">
|
<Style Selector="Grid">
|
||||||
<Style Selector="^:not(.category)">
|
<Style Selector="^:not(.category)">
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Input;
|
||||||
using Avalonia.Interactivity;
|
using Avalonia.Interactivity;
|
||||||
using DiscordChatExporter.Core.Discord.Data;
|
using DiscordChatExporter.Core.Discord.Data;
|
||||||
using DiscordChatExporter.Gui.Framework;
|
using DiscordChatExporter.Gui.Framework;
|
||||||
|
|
@ -22,6 +23,21 @@ public partial class DashboardView : UserControl<DashboardViewModel>
|
||||||
SelectionChangedEventArgs args
|
SelectionChangedEventArgs args
|
||||||
) => DataContext.PullChannelsCommand.Execute(null);
|
) => 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(
|
private void AvailableChannelsTreeView_OnSelectionChanged(
|
||||||
object? sender,
|
object? sender,
|
||||||
SelectionChangedEventArgs args
|
SelectionChangedEventArgs args
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue