Refactor string checks and fix exception when exporting multiple channels

Fix #164
This commit is contained in:
Alexey Golub
2019-04-11 22:56:29 +03:00
parent 7951703cf2
commit 30cba7959f
20 changed files with 33 additions and 26 deletions

View File

@@ -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()
{