mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2025-05-29 05:55:21 -04:00
Change order of parameters in ExportService.Export
This commit is contained in:
parent
bcad5b4ed1
commit
52684c264f
4 changed files with 5 additions and 5 deletions
|
@ -42,7 +42,7 @@ namespace DiscordChatExporter.Cli.Verbs
|
||||||
}
|
}
|
||||||
|
|
||||||
// Export
|
// Export
|
||||||
exportService.Export(Options.ExportFormat, filePath, chatLog);
|
exportService.Export(chatLog, filePath, Options.ExportFormat);
|
||||||
|
|
||||||
// Print result
|
// Print result
|
||||||
Console.WriteLine($"Exported chat to [{filePath}]");
|
Console.WriteLine($"Exported chat to [{filePath}]");
|
||||||
|
|
|
@ -15,7 +15,7 @@ namespace DiscordChatExporter.Core.Services
|
||||||
_settingsService = settingsService;
|
_settingsService = settingsService;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Export(ExportFormat format, string filePath, ChatLog log)
|
public void Export(ChatLog chatLog, string filePath, ExportFormat format)
|
||||||
{
|
{
|
||||||
// Create template loader
|
// Create template loader
|
||||||
var loader = new TemplateLoader();
|
var loader = new TemplateLoader();
|
||||||
|
@ -35,7 +35,7 @@ namespace DiscordChatExporter.Core.Services
|
||||||
};
|
};
|
||||||
|
|
||||||
// Create template model
|
// Create template model
|
||||||
var templateModel = new TemplateModel(format, log, _settingsService.DateFormat);
|
var templateModel = new TemplateModel(format, chatLog, _settingsService.DateFormat);
|
||||||
context.PushGlobal(templateModel.GetScriptObject());
|
context.PushGlobal(templateModel.GetScriptObject());
|
||||||
|
|
||||||
// Create directory
|
// Create directory
|
||||||
|
|
|
@ -4,6 +4,6 @@ namespace DiscordChatExporter.Core.Services
|
||||||
{
|
{
|
||||||
public interface IExportService
|
public interface IExportService
|
||||||
{
|
{
|
||||||
void Export(ExportFormat format, string filePath, ChatLog log);
|
void Export(ChatLog chatLog, string filePath, ExportFormat format);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -260,7 +260,7 @@ namespace DiscordChatExporter.Gui.ViewModels
|
||||||
var chatLog = await _chatLogService.GetChatLogAsync(token, guild, channel, from, to, progressHandler);
|
var chatLog = await _chatLogService.GetChatLogAsync(token, guild, channel, from, to, progressHandler);
|
||||||
|
|
||||||
// Export
|
// Export
|
||||||
_exportService.Export(format, filePath, chatLog);
|
_exportService.Export(chatLog, filePath, format);
|
||||||
|
|
||||||
// Open
|
// Open
|
||||||
Process.Start(filePath);
|
Process.Start(filePath);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue