mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-04-25 23:43:33 +00:00
Refactor string checks and fix exception when exporting multiple channels
Fix #164
This commit is contained in:
@@ -148,7 +148,7 @@
|
||||
<Version>2.0.20525</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Tyrrrz.Extensions">
|
||||
<Version>1.6.0</Version>
|
||||
<Version>1.6.1</Version>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
|
||||
@@ -6,6 +6,7 @@ using DiscordChatExporter.Core.Services;
|
||||
using DiscordChatExporter.Core.Services.Helpers;
|
||||
using DiscordChatExporter.Gui.ViewModels.Components;
|
||||
using DiscordChatExporter.Gui.ViewModels.Framework;
|
||||
using Tyrrrz.Extensions;
|
||||
|
||||
namespace DiscordChatExporter.Gui.ViewModels.Dialogs
|
||||
{
|
||||
@@ -84,7 +85,7 @@ namespace DiscordChatExporter.Gui.ViewModels.Dialogs
|
||||
}
|
||||
|
||||
// If canceled - return
|
||||
if (OutputPath == null)
|
||||
if (OutputPath.IsNullOrWhiteSpace())
|
||||
return;
|
||||
|
||||
// Close dialog
|
||||
|
||||
@@ -122,7 +122,7 @@ namespace DiscordChatExporter.Gui.ViewModels
|
||||
await _dialogManager.ShowDialogAsync(dialog);
|
||||
}
|
||||
|
||||
public bool CanPopulateGuildsAndChannels => !IsBusy && !TokenValue.EmptyIfNull().IsWhiteSpace();
|
||||
public bool CanPopulateGuildsAndChannels => !IsBusy && !TokenValue.IsNullOrWhiteSpace();
|
||||
|
||||
public async void PopulateGuildsAndChannels()
|
||||
{
|
||||
@@ -235,7 +235,7 @@ namespace DiscordChatExporter.Gui.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
public bool CanExportChannels => !IsBusy && SelectedChannels.EmptyIfNull().Any();
|
||||
public bool CanExportChannels => !IsBusy && !SelectedChannels.IsNullOrEmpty();
|
||||
|
||||
public async void ExportChannels()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user