mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2025-05-23 11:16:59 -04:00
[GUI] Notify when all exports are done instead of each of them separately
This commit is contained in:
parent
1325edb135
commit
26322da800
1 changed files with 6 additions and 2 deletions
|
@ -253,6 +253,7 @@ namespace DiscordChatExporter.Gui.ViewModels
|
|||
var operations = ProgressManager.CreateOperations(dialog.Channels.Count);
|
||||
|
||||
// Export channels
|
||||
var successfulExportCount = 0;
|
||||
for (var i = 0; i < dialog.Channels.Count; i++)
|
||||
{
|
||||
// Get operation and channel
|
||||
|
@ -281,8 +282,8 @@ namespace DiscordChatExporter.Gui.ViewModels
|
|||
await _exportService.ExportChatLogAsync(chatLog, filePath, dialog.SelectedFormat,
|
||||
dialog.PartitionLimit);
|
||||
|
||||
// Notify completion
|
||||
Notifications.Enqueue($"Channel [{channel.Model.Name}] successfully exported");
|
||||
// Report successful export
|
||||
successfulExportCount++;
|
||||
}
|
||||
catch (HttpErrorStatusCodeException ex) when (ex.StatusCode == HttpStatusCode.Forbidden)
|
||||
{
|
||||
|
@ -298,6 +299,9 @@ namespace DiscordChatExporter.Gui.ViewModels
|
|||
operation.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
// Notify of overall completion
|
||||
Notifications.Enqueue($"Successfully exported {successfulExportCount} channel(s)");
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue