diff --git a/DiscordChatExporter.Cli/Commands/Base/ExportMultipleCommandBase.cs b/DiscordChatExporter.Cli/Commands/Base/ExportMultipleCommandBase.cs index 51656a9a..a8306378 100644 --- a/DiscordChatExporter.Cli/Commands/Base/ExportMultipleCommandBase.cs +++ b/DiscordChatExporter.Cli/Commands/Base/ExportMultipleCommandBase.cs @@ -23,17 +23,10 @@ namespace DiscordChatExporter.Cli.Commands.Base // This uses a separate route from ExportCommandBase because the progress ticker is not thread-safe // Ugly code ahead. Will need to refactor. - // Progress console.Output.Write($"Exporting {channels.Count} channels... "); - var ticker = console.CreateProgressTicker(); + var progress = console.CreateProgressTicker(); - // TODO: refactor this after improving Gress - var progressManager = new ProgressManager(); - progressManager.PropertyChanged += (sender, args) => ticker.Report(progressManager.Progress); - - var operations = progressManager.CreateOperations(channels.Count); - - // Export channels + var operations = progress.Wrap().CreateOperations(channels.Count); var errors = new List(); @@ -62,7 +55,6 @@ namespace DiscordChatExporter.Cli.Commands.Base } }, ParallelLimit.ClampMin(1)); - ticker.Report(1); console.Output.WriteLine(); foreach (var error in errors) diff --git a/DiscordChatExporter.Cli/DiscordChatExporter.Cli.csproj b/DiscordChatExporter.Cli/DiscordChatExporter.Cli.csproj index 8973b4a2..8cdc6c3b 100644 --- a/DiscordChatExporter.Cli/DiscordChatExporter.Cli.csproj +++ b/DiscordChatExporter.Cli/DiscordChatExporter.Cli.csproj @@ -7,8 +7,8 @@ - - + + diff --git a/DiscordChatExporter.Domain/DiscordChatExporter.Domain.csproj b/DiscordChatExporter.Domain/DiscordChatExporter.Domain.csproj index efd3b46c..19bb5338 100644 --- a/DiscordChatExporter.Domain/DiscordChatExporter.Domain.csproj +++ b/DiscordChatExporter.Domain/DiscordChatExporter.Domain.csproj @@ -3,7 +3,7 @@ - + diff --git a/DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj b/DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj index 9c6e9d7c..721984b4 100644 --- a/DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj +++ b/DiscordChatExporter.Gui/DiscordChatExporter.Gui.csproj @@ -13,16 +13,16 @@ - + - - + + - +