Clean up warnings

This commit is contained in:
Alexey Golub
2020-03-23 19:11:15 +02:00
parent 378f0a20db
commit 70a1c9db8c
6 changed files with 18 additions and 17 deletions

View File

@@ -14,11 +14,11 @@ namespace DiscordChatExporter.Gui.ViewModels.Dialogs
private readonly DialogManager _dialogManager;
private readonly SettingsService _settingsService;
public GuildViewModel Guild { get; set; }
public GuildViewModel? Guild { get; set; }
public IReadOnlyList<ChannelViewModel> Channels { get; set; }
public IReadOnlyList<ChannelViewModel>? Channels { get; set; }
public bool IsSingleChannel => Channels.Count == 1;
public bool IsSingleChannel => Channels == null || Channels.Count == 1;
public string? OutputPath { get; set; }
@@ -62,7 +62,7 @@ namespace DiscordChatExporter.Gui.ViewModels.Dialogs
var channel = Channels.Single();
// Generate default file name
var defaultFileName = ExportLogic.GetDefaultExportFileName(SelectedFormat, Guild, channel, After, Before);
var defaultFileName = ExportLogic.GetDefaultExportFileName(SelectedFormat, Guild!, channel!, After, Before);
// Generate filter
var ext = SelectedFormat.GetFileExtension();