mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2025-05-29 05:55:21 -04:00
[GUI] Cleanup ExportSetupViewModel & RootViewModel
This commit is contained in:
parent
15b605f5a7
commit
f8d55f406c
2 changed files with 6 additions and 6 deletions
|
@ -4,6 +4,7 @@ using System.Linq;
|
||||||
using DiscordChatExporter.Core.Discord;
|
using DiscordChatExporter.Core.Discord;
|
||||||
using DiscordChatExporter.Core.Discord.Data;
|
using DiscordChatExporter.Core.Discord.Data;
|
||||||
using DiscordChatExporter.Core.Exporting;
|
using DiscordChatExporter.Core.Exporting;
|
||||||
|
using DiscordChatExporter.Core.Exporting.Partitioning;
|
||||||
using DiscordChatExporter.Core.Utils.Extensions;
|
using DiscordChatExporter.Core.Utils.Extensions;
|
||||||
using DiscordChatExporter.Gui.Services;
|
using DiscordChatExporter.Gui.Services;
|
||||||
using DiscordChatExporter.Gui.ViewModels.Framework;
|
using DiscordChatExporter.Gui.ViewModels.Framework;
|
||||||
|
@ -48,6 +49,10 @@ namespace DiscordChatExporter.Gui.ViewModels.Dialogs
|
||||||
|
|
||||||
public string? PartitionLimitValue { get; set; }
|
public string? PartitionLimitValue { get; set; }
|
||||||
|
|
||||||
|
public PartitionLimit PartitionLimit => !string.IsNullOrWhiteSpace(PartitionLimitValue)
|
||||||
|
? PartitionLimit.Parse(PartitionLimitValue)
|
||||||
|
: NullPartitionLimit.Instance;
|
||||||
|
|
||||||
public bool ShouldDownloadMedia { get; set; }
|
public bool ShouldDownloadMedia { get; set; }
|
||||||
|
|
||||||
// Whether to show the "advanced options" by default when the dialog opens.
|
// Whether to show the "advanced options" by default when the dialog opens.
|
||||||
|
|
|
@ -7,7 +7,6 @@ using DiscordChatExporter.Core.Discord;
|
||||||
using DiscordChatExporter.Core.Discord.Data;
|
using DiscordChatExporter.Core.Discord.Data;
|
||||||
using DiscordChatExporter.Core.Exceptions;
|
using DiscordChatExporter.Core.Exceptions;
|
||||||
using DiscordChatExporter.Core.Exporting;
|
using DiscordChatExporter.Core.Exporting;
|
||||||
using DiscordChatExporter.Core.Exporting.Partitioning;
|
|
||||||
using DiscordChatExporter.Core.Utils.Extensions;
|
using DiscordChatExporter.Core.Utils.Extensions;
|
||||||
using DiscordChatExporter.Gui.Services;
|
using DiscordChatExporter.Gui.Services;
|
||||||
using DiscordChatExporter.Gui.Utils;
|
using DiscordChatExporter.Gui.Utils;
|
||||||
|
@ -205,10 +204,6 @@ namespace DiscordChatExporter.Gui.ViewModels
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var partitionLimit = !string.IsNullOrWhiteSpace(dialog.PartitionLimitValue)
|
|
||||||
? PartitionLimit.Parse(dialog.PartitionLimitValue)
|
|
||||||
: NullPartitionLimit.Instance;
|
|
||||||
|
|
||||||
var request = new ExportRequest(
|
var request = new ExportRequest(
|
||||||
dialog.Guild!,
|
dialog.Guild!,
|
||||||
channel!,
|
channel!,
|
||||||
|
@ -216,7 +211,7 @@ namespace DiscordChatExporter.Gui.ViewModels
|
||||||
dialog.SelectedFormat,
|
dialog.SelectedFormat,
|
||||||
dialog.After?.Pipe(Snowflake.FromDate),
|
dialog.After?.Pipe(Snowflake.FromDate),
|
||||||
dialog.Before?.Pipe(Snowflake.FromDate),
|
dialog.Before?.Pipe(Snowflake.FromDate),
|
||||||
partitionLimit,
|
dialog.PartitionLimit,
|
||||||
dialog.ShouldDownloadMedia,
|
dialog.ShouldDownloadMedia,
|
||||||
_settingsService.ShouldReuseMedia,
|
_settingsService.ShouldReuseMedia,
|
||||||
_settingsService.DateFormat
|
_settingsService.DateFormat
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue