Split output file into multiple partitions (#116)

This commit is contained in:
Alexey Golub
2018-11-03 22:53:20 +02:00
committed by GitHub
parent aa53cecd4e
commit a0359b1e43
13 changed files with 133 additions and 19 deletions

View File

@@ -129,7 +129,7 @@ namespace DiscordChatExporter.Gui.ViewModels
// Messages
MessengerInstance.Register<StartExportMessage>(this,
m => Export(m.Channel, m.FilePath, m.Format, m.From, m.To));
m => Export(m.Channel, m.FilePath, m.Format, m.From, m.To, m.PartitionLimit));
}
private async void ViewLoaded()
@@ -239,7 +239,8 @@ namespace DiscordChatExporter.Gui.ViewModels
MessengerInstance.Send(new ShowExportSetupMessage(SelectedGuild, channel));
}
private async void Export(Channel channel, string filePath, ExportFormat format, DateTime? from, DateTime? to)
private async void Export(Channel channel, string filePath, ExportFormat format,
DateTime? from, DateTime? to, int? partitionLimit)
{
IsBusy = true;
@@ -258,7 +259,7 @@ namespace DiscordChatExporter.Gui.ViewModels
var chatLog = await _dataService.GetChatLogAsync(token, guild, channel, from, to, progressHandler);
// Export
_exportService.ExportChatLog(chatLog, filePath, format);
_exportService.ExportChatLog(chatLog, filePath, format, partitionLimit);
// Notify completion
MessengerInstance.Send(new ShowNotificationMessage("Export complete"));