diff --git a/DiscordChatExporter.Gui/ViewModels/Components/DashboardViewModel.cs b/DiscordChatExporter.Gui/ViewModels/Components/DashboardViewModel.cs index c8e20f1..9c32faf 100644 --- a/DiscordChatExporter.Gui/ViewModels/Components/DashboardViewModel.cs +++ b/DiscordChatExporter.Gui/ViewModels/Components/DashboardViewModel.cs @@ -90,10 +90,9 @@ public class DashboardViewModel : PropertyChangedBase public void ShowHelp() => ProcessEx.StartShellExecute(App.DocumentationUrl); - public bool CanPopulateGuildsAndChannels => - !IsBusy && !string.IsNullOrWhiteSpace(Token); + public bool CanPopulate => !IsBusy && !string.IsNullOrWhiteSpace(Token); - public async void PopulateGuildsAndChannels() + public async void Populate() { IsBusy = true; var progress = _progressMuxer.CreateInput(); @@ -142,13 +141,13 @@ public class DashboardViewModel : PropertyChangedBase } } - public bool CanExportChannels => + public bool CanExport => !IsBusy && _discord is not null && SelectedGuild is not null && SelectedChannels?.Any() is true; - public async void ExportChannels() + public async void Export() { IsBusy = true; diff --git a/DiscordChatExporter.Gui/Views/Components/DashboardView.xaml b/DiscordChatExporter.Gui/Views/Components/DashboardView.xaml index 70bb6ac..0225ca3 100644 --- a/DiscordChatExporter.Gui/Views/Components/DashboardView.xaml +++ b/DiscordChatExporter.Gui/Views/Components/DashboardView.xaml @@ -104,7 +104,7 @@ Grid.Column="2" Margin="0,6,6,6" Padding="4" - Command="{s:Action PopulateGuildsAndChannels}" + Command="{s:Action Populate}" IsDefault="True" Style="{DynamicResource MaterialDesignFlatButton}" ToolTip="Pull available guilds and channels (Enter)"> @@ -348,7 +348,7 @@ - + @@ -410,9 +410,9 @@ Margin="32,24" HorizontalAlignment="Right" VerticalAlignment="Bottom" - Command="{s:Action ExportChannels}" + Command="{s:Action Export}" Style="{DynamicResource MaterialDesignFloatingActionAccentButton}" - Visibility="{Binding CanExportChannels, Converter={x:Static s:BoolToVisibilityConverter.Instance}}"> + Visibility="{Binding CanExport, Converter={x:Static s:BoolToVisibilityConverter.Instance}}">