diff --git a/DiscordChatExporter.Core/DiscordChatExporter.Core.csproj b/DiscordChatExporter.Core/DiscordChatExporter.Core.csproj
index 7c070181..cf891043 100644
--- a/DiscordChatExporter.Core/DiscordChatExporter.Core.csproj
+++ b/DiscordChatExporter.Core/DiscordChatExporter.Core.csproj
@@ -14,8 +14,8 @@
-
-
+
+
diff --git a/DiscordChatExporter.Core/Services/IUpdateService.cs b/DiscordChatExporter.Core/Services/IUpdateService.cs
index ded18f5e..7e9d071f 100644
--- a/DiscordChatExporter.Core/Services/IUpdateService.cs
+++ b/DiscordChatExporter.Core/Services/IUpdateService.cs
@@ -9,6 +9,6 @@ namespace DiscordChatExporter.Core.Services
Task CheckPrepareUpdateAsync();
- Task FinalizeUpdateAsync();
+ void FinalizeUpdate();
}
}
\ No newline at end of file
diff --git a/DiscordChatExporter.Core/Services/UpdateService.cs b/DiscordChatExporter.Core/Services/UpdateService.cs
index 57de55ff..e0cf78ec 100644
--- a/DiscordChatExporter.Core/Services/UpdateService.cs
+++ b/DiscordChatExporter.Core/Services/UpdateService.cs
@@ -39,12 +39,13 @@ namespace DiscordChatExporter.Core.Services
return null;
// Prepare the update
- await _manager.PrepareUpdateAsync(check.LastVersion);
+ if (!_manager.IsUpdatePrepared(check.LastVersion))
+ await _manager.PrepareUpdateAsync(check.LastVersion);
return _updateVersion = check.LastVersion;
}
- public async Task FinalizeUpdateAsync()
+ public void FinalizeUpdate()
{
// Check if an update is pending
if (_updateVersion == null)
@@ -55,7 +56,7 @@ namespace DiscordChatExporter.Core.Services
return;
// Launch the updater
- await _manager.LaunchUpdaterAsync(_updateVersion, NeedRestart);
+ _manager.LaunchUpdater(_updateVersion, NeedRestart);
_updateFinalized = true;
}
}
diff --git a/DiscordChatExporter.Gui/ViewModels/MainViewModel.cs b/DiscordChatExporter.Gui/ViewModels/MainViewModel.cs
index f9703401..5f418ce2 100644
--- a/DiscordChatExporter.Gui/ViewModels/MainViewModel.cs
+++ b/DiscordChatExporter.Gui/ViewModels/MainViewModel.cs
@@ -143,13 +143,13 @@ namespace DiscordChatExporter.Gui.ViewModels
}
}
- private async void ViewClosed()
+ private void ViewClosed()
{
// Save settings
_settingsService.Save();
// Finalize updates if available
- await _updateService.FinalizeUpdateAsync();
+ _updateService.FinalizeUpdate();
}
private async void PullData()