mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-02-27 11:43:51 +00:00
Split output file into multiple partitions (#116)
This commit is contained in:
@@ -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"));
|
||||
|
||||
Reference in New Issue
Block a user