mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-03-01 04:33:41 +00:00
Prevent choosing invalid from/to dates
This commit is contained in:
@@ -93,6 +93,12 @@ namespace DiscordChatExporter.Gui.ViewModels
|
||||
// Save format
|
||||
_settingsService.LastExportFormat = SelectedFormat;
|
||||
|
||||
// Clamp 'from' and 'to' values
|
||||
if (From > To)
|
||||
From = To;
|
||||
if (To < From)
|
||||
To = From;
|
||||
|
||||
// Start export
|
||||
MessengerInstance.Send(new StartExportMessage(Channel, FilePath, SelectedFormat, From, To));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user