From 1d0a13c613e397d7ddf1d2689190ef7cee47f5df Mon Sep 17 00:00:00 2001 From: Alexey Golub Date: Sun, 15 Apr 2018 17:13:26 +0300 Subject: [PATCH] Always open exported file on completion --- DiscordChatExporter.Gui/ViewModels/MainViewModel.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/DiscordChatExporter.Gui/ViewModels/MainViewModel.cs b/DiscordChatExporter.Gui/ViewModels/MainViewModel.cs index b0ff1ef..33a4251 100644 --- a/DiscordChatExporter.Gui/ViewModels/MainViewModel.cs +++ b/DiscordChatExporter.Gui/ViewModels/MainViewModel.cs @@ -236,9 +236,11 @@ namespace DiscordChatExporter.Gui.ViewModels // Export await _exportService.ExportAsync(format, filePath, log); + // Open + Process.Start(filePath); + // Notify completion - MessengerInstance.Send(new ShowNotificationMessage("Export complete", - "OPEN", () => Process.Start(filePath))); + MessengerInstance.Send(new ShowNotificationMessage("Export complete")); } catch (HttpErrorStatusCodeException ex) when (ex.StatusCode == HttpStatusCode.Forbidden) {