mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-03-19 05:11:31 +00:00
Use is null/is not null
This commit is contained in:
@@ -19,7 +19,7 @@ namespace DiscordChatExporter.Gui.ViewModels.Dialogs
|
||||
|
||||
public IReadOnlyList<Channel>? Channels { get; set; }
|
||||
|
||||
public bool IsSingleChannel => Channels == null || Channels.Count == 1;
|
||||
public bool IsSingleChannel => Channels is null || Channels.Count == 1;
|
||||
|
||||
public string? OutputPath { get; set; }
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace DiscordChatExporter.Gui.ViewModels.Dialogs
|
||||
|
||||
public DateTimeOffset? AfterDate { get; set; }
|
||||
|
||||
public bool IsAfterDateSet => AfterDate != null;
|
||||
public bool IsAfterDateSet => AfterDate is not null;
|
||||
|
||||
public TimeSpan? AfterTime { get; set; }
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace DiscordChatExporter.Gui.ViewModels.Dialogs
|
||||
|
||||
public DateTimeOffset? BeforeDate { get; set; }
|
||||
|
||||
public bool IsBeforeDateSet => BeforeDate != null;
|
||||
public bool IsBeforeDateSet => BeforeDate is not null;
|
||||
|
||||
public TimeSpan? BeforeTime { get; set; }
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace DiscordChatExporter.Gui.ViewModels.Dialogs
|
||||
_settingsService.LastShouldDownloadMedia = ShouldDownloadMedia;
|
||||
|
||||
// If single channel - prompt file path
|
||||
if (Channels != null && IsSingleChannel)
|
||||
if (Channels is not null && IsSingleChannel)
|
||||
{
|
||||
var channel = Channels.Single();
|
||||
var defaultFileName = ExportRequest.GetDefaultOutputFileName(
|
||||
|
||||
Reference in New Issue
Block a user